#include using namespace std; int main(){ int n; int q=-1; cin>>n; for(int i=0;i>x>>y; if(x >= y) { cout<<-1<