// O(n log^2 (1/EPS) log (range)) time solution to train line.
import java.io.*;
import java.util.*;

public class Bryce {
    public static int M = 40;   // max effective distance

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        k = Math.min(k, n);

        int[] p = new int[n];
        double[] d = new double[n];
        for (int i = 0; i < n; ++i) {
            p[i] = in.nextInt();
            d[i] = in.nextInt();
        }

        double hi = 300;    // station utility cannot exceed 300
        double lo = 0;
        while(true) {
            double l = (hi+lo)/2;
        //    System.out.println(lo + " " + l + " " + hi);

            double[] dp = new double[n];  // dp[i] := max utility in prefix [0 to i] placing station at i
            int[] cnt = new int[n]; // the number of stations used in solution dp[i]
            double[] dp_over = new double[n]; // dp_over[i] := max utility in prefix [0 to i]
            int[] over_cnt = new int[n];    // count of stations in dp_over[i]
            for (int i = 0; i < n; ++i) {

                double no_p = -l;
                for (int j = i; j >= Math.max(0, i-M); --j) {    // make this the first placed station
                    no_p += p[j] * Math.pow(2, -(d[i]-d[j]));
                }

                dp[i] = no_p;   // may be negative
                cnt[i] = 1;
                if (i >= M && dp_over[i-M] + no_p > dp[i]) {   // previous station is outside of range of ith station
                    dp[i] = dp_over[i-M] + no_p;
                    cnt[i] = over_cnt[i-M] + 1;
                }

                for (int j = i-1; j >= Math.max(0, i-M*2); --j) {    // previous station is within range of ith station
                    double cur = -l + dp[j];
                    for (int m = j+1; m <= i; ++m) {    // could be optimized out via dp_over, wanted to keep this solution slow
                        double min_d = Math.min(d[m]-d[j], d[i]-d[m]);
                        cur += p[m] * Math.pow(2, -min_d);
                    }
                    if (cur > dp[i]) {
                        dp[i] = cur;
                        cnt[i] = cnt[j]+1;
                    }
                }

                if (i > 0) {
                    if (dp_over[i-1] > dp_over[i]) {
                        dp_over[i] = dp_over[i-1];
                        over_cnt[i] = over_cnt[i-1];
                    }
                }
                double cur = dp[i];
                for (int j = i; j <= Math.min(i+M,n-1); ++j) {
                    if (j > i) {
                        cur += p[j] * Math.pow(2, -(d[j]-d[i]));
                    }
                    if (cur > dp_over[j]) {
                        dp_over[j] = cur;
                        over_cnt[j] = cnt[i];
                    }
                }
            }

        //    System.out.println(over_cnt[n-1]);
        //    System.out.println(dp_over[n-1] + " " + (dp_over[n-1] + k*l));
            if (hi-lo < 1e-6 || over_cnt[n-1] == k) {
                System.out.printf("%.6f\n", dp_over[n-1] + k*l);
                break;
            }

            if (over_cnt[n-1] > k) {
                lo = l;
            } else {
                hi = l;
            }
        }
    }
}
