import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] x = new long[n]; long[] y = new long[n]; for (int i = 0; i < n; i++) { x[i] = sc.nextLong(); y[i] = sc.nextLong(); } sc.close(); int ans = 0; for (int i = 0; i < n; i++) { Map> map = new HashMap<>(); for (int j = 0; j < n; j++) { if (j != i) { long dx = x[j] - x[i]; long dy = y[j] - y[i]; String s = "inf"; if (dx != 0) { if (dx < 0) { dx = -dx; dy = -dy; } long g = gcd(dx, Math.abs(dy)); dx /= g; dy /= g; s = dy + "/" + dx; } List list = map.get(s); if (list == null) { list = new ArrayList<>(); map.put(s, list); } list.add(j); } } label: for (String s : map.keySet()) { List list = map.get(s); if (list.size() < 2) { continue; } list.add(i); long[] z = s.equals("inf") ? y : x; int size = list.size(); Obj[] arr = new Obj[size]; for (int j = 0; j < size; j++) { Obj o = new Obj(); o.i = list.get(j); o.x = z[o.i]; arr[j] = o; } Arrays.sort(arr, (o1, o2) -> Long.compare(o1.x, o2.x)); for (int j = 0; j < size; j++) { Obj o = arr[j]; if (o.i == i && (j >= 2 || j < size - 2)) { ans++; break label; } } } } System.out.println(ans); } static class Obj { int i; long x; } static long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); } }