#include using namespace std; int main(){ int n; cin >> n; int p[n][2]; cin >> p[0][0] >> p[0][1]; int x = p[0][0]; int y = p[0][1]; int c = 0,c1= 0; for(int i = 1; i< n; i++){ cin >> p[i][0] >> p[i][1]; if(x != p[i][0]) c = 1; if(y != p[i][1]) c1 = 1; } if(c == 1 && c1 == 1)cout<< "NO"<