import java.math.*; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PriorityQueue siro = new PriorityQueue<>(); PriorityQueue kuro = new PriorityQueue<>(); int nw = sc.nextInt(); for(int i=0;i siro1 = new PriorityQueue<>(siro); int nb=sc.nextInt(); for (int i = 0; i kuro1 = new PriorityQueue<>(kuro); int ans=1; int count1=1; int now=-1*siro.poll(); while(!kuro.isEmpty() || !siro.isEmpty()){ int bb=0; while(!kuro.isEmpty()){ bb=-1*kuro.poll(); if(bbbb){ now=bb; count1++; }else{ break; } int aa=0; if(siro.isEmpty())break; while(!siro.isEmpty()){ aa=-1*siro.poll(); if(now>aa)break; } if(now>aa){ now=aa; count1++; }else{ break; } } ans=count1; int count2=1; int now1=-1*kuro1.poll(); while(!kuro1.isEmpty() || !siro1.isEmpty()){ int bb=0; while(!siro1.isEmpty()){ bb=-1*siro1.poll(); if(bbbb){ now1=bb; count2++; }else{ break; } int aa=0; if(kuro1.isEmpty()) break; while(!kuro1.isEmpty()){ aa=-1*kuro1.poll(); if(aaaa){ now1=aa; count2++; }else{ break; } } ans=Math.max(ans, count2); System.out.println(ans); } }