def f(A,B,C):
    x = (B[0]-A[0])**2 + (B[1]-A[1])**2
    y = (C[0]-A[0])**2 + (C[1]-A[1])**2
    z = (C[0]-B[0])**2 + (C[1]-B[1])**2

    return (x + y == z) or (x + z == y) or (y + z == x)
