#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 2000000 #define MOD 998244353 #define INF 1000000000 int main(){ int N; cin>>N; vector A(N),B(N); for(int i=0;i>A[i]; } for(int i=0;i>B[i]; } int M=0; for(int i=0;i=0;i--){ if(A[i]