#include using namespace std; long long gcd(long long x, long long y) { if (y == 0) return x; return gcd(y, x % y); } long long lcm(long long x, long long y) { if (x == 0 || y == 0) return 0; return x / gcd(x, y) * y; } int main() { int N; cin >> N; vector S(N), T(N); for (int i = 0; i < N; i++) { cin >> S[i]; } for (int i = 0; i < N; i++) { cin >> T[i]; } for (int i = 0; i < N; i++) { if (S[i] != T[i]) { cout << i + 1 << endl; cout << S[i] << endl; cout << T[i] << endl; break; } } }