using System; public class Hello{ public static void Main(){ int N = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); string[] input2 = Console.ReadLine().Split(' '); for(int x = 0;x < N;x++){ if(input[x] != input2[x]){ Console.WriteLine(x + 1); Console.WriteLine(input[x]); Console.WriteLine(input2[x]); return; } } } }