Problem: One day Natalia was walking in the woods when she met a little mushroom gnome. The gnome told her the following story:

Everybody knows that the mushroom gnomes' power lies in the magic mushrooms that grow in the native woods of the gnomes. There are n trees and m magic mushrooms in the woods: the i-th tree grows at a point on a straight line with coordinates ai and has the height of hi, the j-th mushroom grows at the point with coordinates bj and has magical powers zj.

But one day wild mushroommunchers, the sworn enemies of mushroom gnomes unleashed a terrible storm on their home forest. As a result, some of the trees began to fall and crush the magic mushrooms. The supreme oracle of mushroom gnomes calculated in advance the probability for each tree that it will fall to the left, to the right or will stand on. If the tree with the coordinate x and height h falls to the left, then all the mushrooms that belong to the right-open interval [x - h, x), are destroyed. If a tree falls to the right, then the mushrooms that belong to the left-open interval (x, x + h] are destroyed. Only those mushrooms that are not hit by a single tree survive.

Knowing that all the trees fall independently of each other (i.e., all the events are mutually independent, and besides, the trees do not interfere with other trees falling in an arbitrary direction), the supreme oracle was also able to quickly calculate what would be the expectation of the total power of the mushrooms which survived after the storm. His calculations ultimately saved the mushroom gnomes from imminent death.

Natalia, as a good Olympiad programmer, got interested in this story, and she decided to come up with a way to quickly calculate the expectation of the sum of the surviving mushrooms' power.

Input

The first line contains two integers n and m (1 ≤ n ≤ 105, 1 ≤ m ≤ 104) — the number of trees and mushrooms, respectively.

Each of the next n lines contain four integers — ai, hi, li, ri (|ai| ≤ 109, 1 ≤ hi ≤ 109, 0 ≤ li, ri, li + ri ≤ 100) which represent the coordinate of the i-th tree, its height, the percentage of the probabilities that the tree falls to the left and to the right, respectively (the remaining percentage is the probability that the tree will stand on).

Each of next m lines contain two integers bj, zj (|bj| ≤ 109, 1 ≤ zj ≤ 103) which represent the coordinate and the magical power of the j-th mushroom, respectively.

An arbitrary number of trees and mushrooms can grow in one point.

Output

Print a real number — the expectation of the total magical power of the surviving mushrooms. The result is accepted with relative or absolute accuracy 10 - 4.

Examples

Input

1 1
2 2 50 50
1 1


Output

0.5000000000


Input

2 1
2 2 50 50
4 2 50 50
3 1


Output

0.2500000000

Note

It is believed that the mushroom with the coordinate x belongs to the right-open interval [l, r) if and only if l ≤ x < r. Similarly, the mushroom with the coordinate x belongs to the left-open interval (l, r] if and only if l < x ≤ r.

In the first test the mushroom survives with the probability of 50%, depending on where the single tree falls.

In the second test the mushroom survives only if neither of the two trees falls on it. It occurs with the probability of 50%  ×  50% = 25%.

Pretest №12 is the large test with 105 trees and one mushroom.

Solution (in JAVA):

Solution:
//package round99;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;

public class C {
	InputStream is;
	PrintWriter out;
	String INPUT = "";
	
	void solve()
	{
		int n = ni(), m = ni();
		int[][] t = new int[n][4];
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 4;j++){
				t[i][j] = ni();
			}
		}
		int[][] mush = new int[m][2]; // pos mp
		for(int i = 0;i < m;i++){
			for(int j = 0;j < 2;j++){
				mush[i][j] = ni();
			}
		}
		Arrays.sort(mush, new Comparator<int[]>(){
			public int compare(int[] a, int[] b){
				return a[0] - b[0];
			}
		});
		
		int[][] r = new int[2*n][3]; // left right p
		int[][] ev = new int[4*n][2]; // pos ind
		for(int i = 0;i < n;i++){
			r[2*i][0] = t[i][0]-t[i][1];
			r[2*i][1] = t[i][0]-1;
			r[2*i][2] = t[i][2];
			r[2*i+1][0] = t[i][0]+1;
			r[2*i+1][1] = t[i][0]+t[i][1];
			r[2*i+1][2] = t[i][3];
		}
		for(int i = 0;i < 2*n;i++){
			ev[2*i][0] = r[i][0];
			ev[2*i][1] = i;
			ev[2*i+1][0] = r[i][1]+1;
			ev[2*i+1][1] = i;
		}
		
		Arrays.sort(ev, new Comparator<int[]>(){
			public int compare(int[] a, int[] b){
				return a[0] - b[0];
			}
		});
		
		int p = 0;
		double E = 0;
		boolean[] flag = new boolean[2*n];
		SegmentTreeRSQ st = new SegmentTreeRSQ(2*n);
		for(int i = 0;i < m;i++){
			while(p < 4*n && ev[p][0] <= mush[i][0]){
				if(flag[ev[p][1]]){
					st.update(ev[p][1], 1.0);
					flag[ev[p][1]] = false;
				}else{
					st.update(ev[p][1], (double)(100-r[ev[p][1]][2]) / 100);
					flag[ev[p][1]] = true;
				}
				p++;
			}
//			tr(p, P, mush[i][1], mush[i][0]);
			E += st.sum(0, 2*n-1)*mush[i][1];
		}
		out.printf("%.8f\n", E);
	}
	
	public static class SegmentTreeRSQ {
		public int M, H, N, B;
		public double[] st;
		
		public SegmentTreeRSQ(int n)
		{
			N = n;
			H = Integer.highestOneBit(Math.max(N,1))<<1;
			M = H<<1;
			B = Integer.numberOfTrailingZeros(H);
			st = new double[M];
			for(int i = 0;i < N;i++){
				st[H+i] = 1.0;
			}
			for(int i = (M>>1)-1;i >= 1;i--){
				st[i] = st[i*2] * st[i*2+1];
			}
		}
		
		public void update(int pos, double v)
		{
			st[H+pos] = v;
			for(int i = (H+pos)>>1;i >= 1;i >>>= 1){
				st[i] = st[2*i] * st[2*i+1];
			}
		}
		
		public double sum(int f, int t) { return sum(f, t, B); }
		
		protected double sum(int f, int t, int b)
		{
			if(f>>b<<b==f && t+1>>b<<b==t+1){
				return st[(H|f)>>b];
			}
			
			b--;
			if((f^t)<<31-b<0){
				int w = t>>b<<b;
				return sum(f, w-1, b) * sum(w, t, b);
			}else{
				return sum(f, t, b);
			}
		}
	}
	
	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}
	
	public static void main(String[] args) throws Exception
	{
		new C().run();
	}
	
	public int ni()
	{
		try {
			int num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}
			
			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}
	
	public long nl()
	{
		try {
			long num = 0;
			boolean minus = false;
			while((num = is.read()) != -1 && !((num >= '0' && num <= '9') || num == '-'));
			if(num == '-'){
				num = 0;
				minus = true;
			}else{
				num -= '0';
			}
			
			while(true){
				int b = is.read();
				if(b >= '0' && b <= '9'){
					num = num * 10 + (b - '0');
				}else{
					return minus ? -num : num;
				}
			}
		} catch (IOException e) {
		}
		return -1;
	}
	
	public String ns()
	{
		try{
			int b = 0;
			StringBuilder sb = new StringBuilder();
			while((b = is.read()) != -1 && (b == '\r' || b == '\n' || b == ' '));
			if(b == -1)return "";
			sb.append((char)b);
			while(true){
				b = is.read();
				if(b == -1)return sb.toString();
				if(b == '\r' || b == '\n' || b == ' ')return sb.toString();
				sb.append((char)b);
			}
		} catch (IOException e) {
		}
		return "";
	}
	
	public char[] ns(int n)
	{
		char[] buf = new char[n];
		try{
			int b = 0, p = 0;
			while((b = is.read()) != -1 && (b == ' ' || b == '\r' || b == '\n'));
			if(b == -1)return null;
			buf[p++] = (char)b;
			while(p < n){
				b = is.read();
				if(b == -1 || b == ' ' || b == '\r' || b == '\n')break;
				buf[p++] = (char)b;
			}
			return Arrays.copyOf(buf, p);
		} catch (IOException e) {
		}
		return null;
	}
	
	
	double nd() { return Double.parseDouble(ns()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}