import java.io.*; import java.util.*; /** * Created by pdhinwa on 21/04/17. */ public class Main { private class Point { int x, y; public Point(int x, int y) { this.x = x; this.y = y; } } private class Slope { int firstPointIndex; int secondPointIndex; public Slope(int firstPointIndex, int secondPointIndex) { this.firstPointIndex = firstPointIndex; this.secondPointIndex = secondPointIndex; } } final long INF = (long) 1e18; void main() throws IOException { Reader reader = new Reader(); Writer writer = new Writer(); String[] data = reader.readString().split(" "); Checker.check(data.length == 2); int N = Integer.parseInt(data[0]); long K = Long.parseLong(data[1]); Checker.check(N, 3, 3500); Checker.check(K, 1, INF); Point[] points = new Point[N]; for (int i = 0; i < N; i++) { int[] temp = reader.readArray(); Checker.check(temp.length == 2); int x = temp[0], y = temp[1]; Checker.check(x, 1, (int) 1e9); Checker.check(y, 1, (int) 1e9); points[i] = new Point(x, y); } // Sort points based on y already. Arrays.sort(points, (a, b) -> a.y - b.y); Integer[] sortedIndices = new Integer[N]; for (int i = 0; i < N; i++) { sortedIndices[i] = i; } List slopes = new ArrayList<>(); for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { slopes.add(new Slope(i, j)); } } Collections.sort(slopes, (a, b) -> { Point p = new Point(points[a.firstPointIndex].x - points[a.secondPointIndex].x, points[a.firstPointIndex].y - points[a.secondPointIndex].y); Point q = new Point(points[b.firstPointIndex].x - points[b.secondPointIndex].x, points[b.firstPointIndex].y - points[b.secondPointIndex].y); long val = cross(p, q); if (val == 0) { return 0; } return val > 0 ? -1 : 1; }); int[] where = new int[N]; for (int i = 0; i < N; i++) { where[i] = i; } /* for (Slope slope: slopes) { double d = (points[slope.firstPointIndex].y - points[slope.secondPointIndex].y) / (double) (points[slope.firstPointIndex].x - points[slope.secondPointIndex].x); System.out.println("slope = " + d); } */ long ans = -1; for (Slope slope : slopes) { /* for (int i = 0; i < N; i++) { long a = area(points[slope.firstPointIndex], points[slope.secondPointIndex], points[sortedIndices[i]]); //System.out.println("i = " + i + " area = " + a); if (i > 0) { long b = area(points[slope.firstPointIndex], points[slope.secondPointIndex], points[sortedIndices[i - 1]]); Checker.check(a >= b); } } */ // Check the up points only. { int lo = 0, hi = N - 1; while (lo <= hi) { int mid = (lo + hi) / 2; long a = area(points[slope.firstPointIndex], points[slope.secondPointIndex], points[sortedIndices[mid]]); if (a > K) { hi = mid - 1; } else { lo = mid + 1; ans = Math.max(ans, a); } } } // Check the below points only. { int lo = 0, hi = N - 1; while (lo <= hi) { int mid = (lo + hi) / 2; long a = area(points[slope.firstPointIndex], points[slope.secondPointIndex], points[sortedIndices[mid]]); if (a >= -K) { ans = Math.max(ans, -a); hi = mid - 1; } else { lo = mid + 1; } } } // int t = sortedIndices[where[slope.firstPointIndex]]; sortedIndices[where[slope.firstPointIndex]] = sortedIndices[where[slope.secondPointIndex]]; sortedIndices[where[slope.secondPointIndex]] = t; int temp = where[slope.firstPointIndex]; where[slope.firstPointIndex] = where[slope.secondPointIndex]; where[slope.secondPointIndex] = temp; } System.out.println(ans == 0 ? -1 : ans); writer.close(); reader.readEof(); } private long cross(Point a, Point b) { return (a.x * (long) b.y - b.x * (long) a.y); } private long area(Point a, Point b, Point c) { return cross(a, b) + cross(b, c) + cross(c, a); } public static void main(String[] args) throws IOException { try { new Main().main(); } catch (Exception e) { e.printStackTrace(); throw e; } } private class Writer extends PrintWriter { Writer() throws FileNotFoundException { super(System.out); } Writer(File file) throws FileNotFoundException { super(file); } } private class Reader { String[] data; BufferedReader bufferedReader; Reader() { bufferedReader = new BufferedReader(new InputStreamReader(System.in)); } Reader(File file) throws FileNotFoundException { bufferedReader = new BufferedReader(new FileReader(file)); } String readString() throws IOException { return bufferedReader.readLine(); } void readEof() throws IOException { Checker.check(readString() == null); } int readInt() throws IOException { return Integer.parseInt(readString()); } int[] readArray() throws IOException { data = readString().split(" "); int[] res = new int[data.length]; for (int i = 0; i < res.length; i++) { res[i] = Integer.parseInt(data[i]); } return res; } } private static class Checker { private static void check(long x, long L, long R) { if (x < L || x > R) { throw new RuntimeException(); } } private static void check(boolean b) { if (!b) { throw new RuntimeException(); } } private static void check(int x, int L, int R) { if (x < L || x > R) { throw new RuntimeException(); } } } }