#include #include #include #include #include //--------------------------- using namespace std; //--------------------------- #define REP(i,n) for(int i = 0; i < (n); i++) #define P(x) cout << (x) << "\n" //--------------------------- int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); int n;cin>>n; vector a(n),b(n); REP(i,n){cin >>a[i];} REP(i,n){cin >>b[i];} REP(i,n){ if (a[i] != b[i]) { cout << i+1 << "\n" << a[i] << "\n" << b[i] <<"\n"; break; } } return 0; }