#include using namespace std; #define MM 100000 int main() { int n, m, i, a[MM], b[MM], aa = 0, bb = 0, ak = 0, bk = 0; cin>> n >> m; for (i = 0; i < n; i++) { cin>> a[i] >> b[i]; } for (i = 0; i < n; i++) { if (a[i]>b[i] && ak