Problem: It turns out that you are a great fan of rock band AC/PE. Peter learned that and started the following game: he plays the first song of the list of n songs of the group, and you have to find out the name of the song. After you tell the song name, Peter immediately plays the following song in order, and so on.

The i-th song of AC/PE has its recognizability pi. This means that if the song has not yet been recognized by you, you listen to it for exactly one more second and with probability of pi percent you recognize it and tell it's name. Otherwise you continue listening it. Note that you can only try to guess it only when it is integer number of seconds after the moment the song starts playing.

In all AC/PE songs the first words of chorus are the same as the title, so when you've heard the first ti seconds of i-th song and its chorus starts, you immediately guess its name for sure.

For example, in the song Highway To Red the chorus sounds pretty late, but the song has high recognizability. In the song Back In Blue, on the other hand, the words from the title sound close to the beginning of the song, but it's hard to name it before hearing those words. You can name both of these songs during a few more first seconds.

Determine the expected number songs of you will recognize if the game lasts for exactly T seconds (i. e. you can make the last guess on the second T, after that the game stops).

If all songs are recognized faster than in T seconds, the game stops after the last song is recognized.

Input

The first line of the input contains numbers n and T (1 ≤ n ≤ 5000, 1 ≤ T ≤ 5000), separated by a space. Next n lines contain pairs of numbers pi and ti (0 ≤ pi ≤ 100, 1 ≤ ti ≤ T). The songs are given in the same order as in Petya's list.

Output

Output a single number — the expected number of the number of songs you will recognize in T seconds. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6.

Examples

Input

2 2
50 2
10 1


Output

1.500000000


Input

2 2
0 2
100 2


Output

1.000000000


Input

3 3
50 3
50 2
25 2


Output

1.687500000


Input

2 2
0 2
0 2


Output

1.000000000

Solution (in JAVA):

Solution:
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;

public class CF_284D {

    static Reader sc = new Reader();
    static PrintWriter out = new PrintWriter(System.out);

    static int n;
    static int T;
    static double[] p;
    static int[] t;

    public static void main(String[] args) throws IOException {
        n = sc.nextInt();
        T = sc.nextInt();

        p = new double[n];
        int[] pp = new int[n];
        t = new int[n];
        
        double[] prev = new double[T + 1];
        double[] act = new double[T + 1];

        for (int i = 0; i < n; i++) {
            pp[i] = sc.nextInt();
            p[i] = pp[i] / 100d;
            t[i] = sc.nextInt();
        }

        double[][] qq = new double[101][T+1];
        
        for (int i = 0; i < 101; i++) {
            qq[i][0] = 1;
            for (int j = 1; j < T+1; j++) {
                qq[i][j] = qq[i][j-1] * (1 - i/100.0);
            }
        }
        
//        double[] q = new double[T+1];
        
        for (int guessed = n - 1; guessed >= 0; guessed--) {
            
            double[] temp = prev;           
            prev = act;
            act = temp;
                        
            boolean found = false;
            double accum = 0;
            int prevMaxK = 0;
            
            for (int left = 1; left <= T; left++) {
                double res = 0;
                
//                q[0] = 1;
//                for (int i = 1; i < T+1; i++) {
//                    q[i] = q[i-1] * (1- p[guessed]);
//                    if(q[i] < 1e-275)
//                        break;
//                }
                
                
                if(!found) {
                    double actAccum = 0;
                    prevMaxK = Math.min(t[guessed], left + 1) - 1;
                    for (int k = 1; k < Math.min(t[guessed], left + 1); k++) {
                        double gAfter2 = prev[left - k];
                        actAccum += (gAfter2 + 1.0) * p[guessed] * qq[pp[guessed]][k-1];//q[k - 1];
                        found = true;
                    }
                    accum += actAccum;
                    res += actAccum;
                    
                } else {
                    
                    int curMaxK = Math.min(t[guessed], left + 1) - 1;
                    
                    int prevL = left - 1 - prevMaxK;
                    int prevR = left - 2;
                    
                    int curL = left - curMaxK;
                    int curR = left - 1;
                            
                    double actAccum = 0;
                    double actAccum2 = 0;
                    
                    for (int i = prevR + 1; i <= curR; i++){ // Longer r new
                        actAccum2 += (prev[i] + 1.0) * p[guessed] * qq[pp[guessed]][left - i - 1]; // left - i = k
                    }
                    for (int i = curR + 1; i <= prevR; i++){ // Longer r old
                        actAccum2 -= (prev[i] + 1.0) * p[guessed] * qq[pp[guessed]][left - i - 1];
                    }
                    for (int i = prevL; i < curL; i++) {// Longer l old
                        actAccum2 -= (prev[i] + 1.0) * p[guessed] * qq[pp[guessed]][left - i - 1];
                    }
                    for (int i = curL; i < prevL; i++) {// Longer l cur      
                        actAccum2 += (prev[i] + 1.0) * p[guessed] * qq[pp[guessed]][left - i - 1];
                    }
                    accum *= 1.0 - p[guessed];
                    accum += actAccum2;
                    
                    prevMaxK = curMaxK;
                    
                    res += accum;
                }

                if (left - t[guessed] >= 0) {
                    double gAfter2 = prev[left - t[guessed]];
                    res += (gAfter2 + 1.0) * qq[pp[guessed]][t[guessed] - 1];
                }

                act[left] = res;
            }
        }

        out.println(act[T]);

        out.close();
    }

    static class Reader {
        final private int BUFFER_SIZE = 1 << 12;private byte[] buffer;private int bufferPointer, bytesRead;
        public Reader(){buffer=new byte[BUFFER_SIZE];bufferPointer=bytesRead=0;
        }private void fillBuffer() throws IOException{bytesRead=System.in.read(buffer,bufferPointer=0,BUFFER_SIZE);if(bytesRead==-1)buffer[0]=-1;
        }private byte read() throws IOException{if(bufferPointer==bytesRead)fillBuffer();return buffer[bufferPointer++];
        }public String next() throws IOException{StringBuilder sb = new StringBuilder();byte c;while((c=read())<=' '){if(c==-1) return null;};do{sb.append((char)c);}while((c=read())>' ');if (sb.length()==0) return null;return sb.toString();
        }public String nextLine() throws IOException{StringBuilder sb = new StringBuilder();byte c;boolean read = false;while((c=read())!=-1){if(c=='\n') {read = true;break;}if(c>=' ')sb.append((char)c);}if (!read) return null;return sb.toString();
        }public int nextInt() throws IOException{int ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public long nextLong() throws IOException{long ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10L+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public double nextDouble() throws IOException{double ret=0,div=1;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c = read();do {ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(c=='.')while((c=read())>='0'&&c<='9')ret+=(c-'0')/(div*=10);if(neg)return -ret;return ret;
        }public int[] na(int n) throws IOException{int[] a = new int[n];for(int i = 0;i < n;i++)a[i] = nextInt();return a;
        }public int[][] nm(int n, int m) throws IOException{int[][] map = new int[n][m];for(int i = 0;i < n;i++)map[i] = na(m);return map;
        }public void close() throws IOException{if(System.in==null) return;System.in.close();}
    }

    static void print(int[] A) {for(int i=0;i<A.length;i++){if(i!=0) out.print(' ');out.print(A[i]);}out.println();}
    static <T> void print(Iterable<T> A) {int i = 0;for(T act : A){if(i!=0)out.print(' ');out.print(act);i++;}out.println();}
    static void printPlus1(Iterable<Number> A) {int i = 0;for(Number act : A){if(i!=0)out.print(' ');out.print(act.longValue() + 1L);i++;}out.println();}
    static void debug(Object... o) { System.err.println(Arrays.deepToString(o)); }

    /*
    long s = System.currentTimeMillis();
    debug(System.currentTimeMillis()-s+"ms");
     */
}