You are viewing a single comment's thread. Return to all comments →
n = int(input()) xc = [] yc = [] for _ in range(n): x, y = map(int, input().split()) xc.append(x) yc.append(y) same_line = False for i in range(1, n): if(xc[i-1] != xc[i]): break else: same_line = True for i in range(1, n): if(yc[i-1] != yc[i]): break else: same_line = True print("YES" if same_line else "NO")
Seems like cookies are disabled on this browser, please enable them to open this website
Points On a Line
You are viewing a single comment's thread. Return to all comments →
For Python3 Platform