import java.io.*; import java.util.*; class Main { public static void main(String[] args) { MyScanner sc = new MyScanner(); out = new PrintWriter(new BufferedOutputStream(System.out)); int n=sc.nextInt(); int m=sc.nextInt(); long[]ans=new long[n]; boolean ok=false; for(int i=0;ihm=new HashSet(); long c=0; for(int j=0;j