#include <iostream> #include <sstream> #include <stdio.h> #include <string> #include <math.h> #include <algorithm> #include <stdlib.h> #include <stack> #include <map> #include <set> #include <queue> using namespace std; int change(int a,int b,int c) { return a*3600+b*60+c; } int main() { #ifdef ONLINE_JUDGE #else freopen("1.txt","r",stdin); #endif int a,b,c,d; int e,f,g,h; double k1,k2; while( scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h)) { if( a!=c && e!=g ) { k1 = 1.0*(d-b)/(c-a); k2 = 1.0*(h-f)/(g-e); if(k1 == k2) { if(b-a*k1==f-e*k2) printf("Yes\n"); else printf("No\n"); } else { printf("Yes\n"); } } else if(a==c&&e==g) { if(a==e) printf("Yes\n"); else printf("No\n"); } else { printf("Yes\n"); } } return 0; } |
Double click to view unformatted code.