import java.util.Scanner; import java.util.ArrayList; import java.util.HashSet; import java.lang.Math; import java.lang.String; class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int N,W,m,n,cnt=0,a; N=Integer.parseInt(scan.next()); W=Integer.parseInt(scan.next()); ArrayList A=new ArrayList(); for(int i=0;i ans=new HashSet(); for(int i=0;i