#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; while(cin>>a>>b>>c>>d){ int e,f,g,h; double k1,k2; cin>>e>>f>>g>>h; if(a==c) k1=99999; else k1=1.0*(c-a)/(d-b); if(e==g) k2=99999; else k2=1.0*(g-e)/(h-f); if(k1!=k2) cout<<"Yes"<<endl; else cout<<"No"<<endl; } } |
Double click to view unformatted code.