Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- bool found=false;
- int n;
- cin >> n;
- int x[10000], y[10000];
- for(int i=0; i<n ;i++){
- cin >> x[i]>> y[i];
- }
- for(int i=0; i<n-1; i++){
- for(int j=i+1; j<n; j++){
- if(x[i]==x[j]) {
- cout<<"yes";
- found=true;
- break;
- }
- if(y[i]==y[j]) {
- cout<<"yes";
- found=true;
- break;
- }
- if(x[i]-x[j]==y[i]-y[j]) {
- cout<<"yes";
- found=true;
- break;
- }
- }
- if(found) break;
- }
- if(found==false) cout<<"no";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement