#include #include #include #include using namespace std; typedef pair point; int N; point Y,M; vector C; vector CC; double dist(point p1, point p2){ double dx = p2.first - p1.first; double dy = p2.second - p1.second; return sqrt(dx * dx + dy * dy); } bool solve(point pos, double time, int corrected){ #ifdef DEBUG for(int i=0; i= dist(M, C[j])){ ok = false; break; } } if(ok){ CC[i] = true; if(solve(C[i], time2, corrected+1)){ return true; } CC[i] = false; } } } return false; } int main(){ int yx, yy, mx, my; vector cc; while(cin >> N >> yx >> yy >> mx >> my){ Y = make_pair(yx,yy); M = make_pair(mx,my); if(N == 0){ break; } C.clear(); CC.clear(); for(int i=0; i> cx >> cy; C.push_back(make_pair(cx,cy)); CC.push_back(false); } if(solve(Y, 0, 0)){ cout << "YES" << endl; }else{ cout << "NO" << endl; } } return 0; }