#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include using namespace std; typedef long long lint; #define MIN(a,b) ((a)<(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b)) 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 << s[i] << endl << t[i] << endl; break; } } return 0; }