#include<stdio.h> #include <string.h> #include <math.h> int main(){ int x1,y1,x2,y2; int x3,y3,x4,y4; double tn1,tn2; while(scanf("%d%d%d%d",&x1,&y1,&x2,&y2)!=EOF){ scanf("%d%d%d%d",&x3,&y3,&x4,&y4); if(x1!=x2&&x3!=x4){ if((y2-y1)/(x2-x1)==(y4-y3)/(x4-x3)){ if(y1-x1*(y2-y1)/(x2-x1)==y3-x3*(y4-y3)/(x4-x3)) printf("Yes\n"); else printf("No\n"); } else printf("Yes\n"); } else if(x1==x2&&x3==x4){ if(x1==x3) printf("Yes\n"); else printf("No\n"); } else{ printf("Yes\n"); } } printf("\n"); return 0; } |
Double click to view unformatted code.