View Code of Problem 67

while True:
    try:
        x1, y1, x2, y2 = map(int, input().split(' '))
        x3, y3, x4, y4 = map(int, input().split(' '))
        k1 = (x2 - x1) * (y4 - y3)
        k2 = (y2 - y1) * (x4 - x3)
        k3 = (y3 - y1) * (x3 - x1)
        k4 = (y2 - y1) * (x3 - x1)
        if (k1 == k2 and k3 != k4):
            print('No')
        else:
            print('Yes')
    except EOFError:
        break

Double click to view unformatted code.


Back to problem 67