#include<iostream> using namespace std; int main() { int n,m; cin>>n>>m; int a[n],b[n],i,j,flag; for(i