import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n1 = 0; int a1 = 1; int a2 = 1; int n2 = 0; int b1 = 1; int b2 = 1; n1 = sc.nextInt(); a1 = sc.nextInt(); for(int i=1;i