import java.io.File; import java.io.FileNotFoundException; import java.util.*; public class f { final int GRPSIZE = 1000; final static float VERTSLOPE = Float.POSITIVE_INFINITY; final static float VERTY = Float.NEGATIVE_INFINITY; @SuppressWarnings("unused") public static void main(String[] args) { Scanner in = new Scanner(System.in); if (false) { File f = new File("data.txt"); in.close(); try { in = new Scanner(f); } catch (FileNotFoundException e) { e.printStackTrace(); } } int n = in.nextInt(); int p = in.nextInt(); int points[][] = new int[n][2];// 0 is x, 1 is y int needed = (int) Math.round(n * p / 100.0); for (int i = 0; i < n; i++) { points[i][0] = in.nextInt(); points[i][1] = in.nextInt(); } in.close(); long startTime = System.nanoTime(); while(System.nanoTime() - startTime < (long)2E9) { // select a random point int index = (int) (Math.random() * n); if (fits(points, n, points[index][0], points[index][1], needed)) { System.out.println("possible"); return; } } System.out.println("impossible"); } public static boolean fits(int[][] points, int n, int x1, int y1, int needed) { HashMap cts = new HashMap(); for (int i = 0; i < n; i++) { int dx = points[i][0] - x1; int dy = points[i][1] - y1; float slope; float yint = 0; if (dx == 0) { if(dy == 0) continue; slope = VERTSLOPE; yint = x1; } else { slope = (float) dy / (float) dx; yint = y1 - slope * x1; } String key = float2str(slope, yint); if (cts.containsKey(key)) cts.put(key, cts.get(key) + 1); else cts.put(key, 2); } //System.out.println(hash2String(cts)); int maxcnt = 0; for (int v : cts.values()) if (v > maxcnt) maxcnt = v; if (maxcnt >= needed) return true; else return false; } public static String float2str(float x, float y) { String s = String.format("%1.4e,%1.4ef", x, y); return s; } public static String hash2String(HashMap hs) { String s = ""; for (String o : hs.keySet()) { if((Integer)hs.get(o) > 5) s += o + ": " + hs.get(o).toString() + "\n"; } return s; } }