#include #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define INF 2e9 #define ALL(v) v.begin(), v.end() using namespace std; typedef long long ll; typedef vector vi; typedef vector> vvi; typedef vector vs; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; vector s(n); vector t(n); cin >> n; REP(i, n) { cin >> s[i]; } REP(i, n) { cin >> t[i]; } int idx = 0; REP(i, n) { if(s[i] != t[i]) { idx = i; } } cout << idx + 1 << endl; cout << s[idx] << endl; cout << t[idx] << endl; }