import java.math.*; import java.util.*; public class Main { static int[] uni; static int root(int a){ if(uni[a]<0) return a; return uni[a] = root(uni[a]); } static boolean connect(int a,int b){ a = root(a); b=root(b); if(a==b) return false; if(uni[a]>uni[b]){ a ^= b; b^=a; a^=b; } uni[a]=uni[a]+uni[b]; uni[b]=a; return true; } static boolean isConnect(int a,int b){ return root(a)==root(b); } static int size(int a){ return -uni[a]; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] x = new int[n]; int[] y = new int[n]; uni=new int[n]; Arrays.fill(uni, -1); if(n==0){ System.out.println(1); return; } for(int i=0;i