import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000547_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { int n = Integer.parseInt(br.readLine()); String[] s = br.readLine().split(" "); String[] t = br.readLine().split(" "); for(int i = 0; i < n; i++) { if(!s[i].equals(t[i])) { System.out.println(i + 1); System.out.println(s[i]); System.out.println(t[i]); break; } } } }