#include using namespace std; #define all(c) (c).begin(),(c).end() #define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--) #define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define rep(i,n) REP(i,0,n) #define iter(c) __typeof((c).begin()) #define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++) #define pb(a) push_back(a) #define pr(a) cout<<(a)<> #define F first #define S second #define ll long long bool check(int n,int m,int x,int y){return x>=0&&x=0&&y P; const double EPS = 1e-8; const double PI = 6.0 * asin(0.5); namespace std { bool operator < (const P& a, const P& b){ return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) : real(a) < real(b); } } double dot(P a, P b){ return real(conj(a)*b); } double cross(P a, P b){ return imag(conj(a)*b); } int ccw(P a, P b, P c){ b -= a; c -= a; if(cross(b,c) > EPS) return 1; if(cross(b,c) < -EPS) return -1; if(dot(b,c) < -EPS) return 2; if(norm(b) < norm(c)) return -2; return 0; } int main() { bool ck=false; P p[5]; rep(i,5) { int x,y; cin >> x >> y; p[i]=P(x,y); } sort(p,p+5); do { bool ck2=true; rep(i,5) { int c=0,c2=0; rep(j,5) { if(j==i || j==(i+1)%5) continue; int t=ccw(p[i],p[i+1],p[j]); if(t==1) c++; if(t==-1) c2++; } if(c!=1 || c2!=2) ck2=false; } if(ck2) ck=true; } while(next_permutation(p,p+5)); if(ck) cout << "YES" << endl; else cout << "NO" << endl; return 0; }