import math class Point: # Конструктор def __init__(self, first_arg=0, second_arg=0): if type(first_arg) == str: self.x, self.y = map(float, first_arg.split()) else: self.x = first_arg self.y = second_arg def dist(self): return math.hypot(self.x, self.y) # Переопределение перевода в строку def __str__(self): return str(self.x) + " " + str(self.y) class Vector: # Конструктор def __init__(self, first_arg=0, second_arg=0): if type(first_arg) == str: self.x, self.y = map(float, first_arg.split()) elif type(first_arg) == Point: self.x = second_arg.x - first_arg.x self.y = second_arg.y - first_arg.y else: self.x = first_arg self.y = second_arg def dist(self): return math.hypot(self.x, self.y) def __str__(self): return str(self.x) + " " + str(self.y) # Пример перегрузки оператора "%" def __mod__(self, other): return self.x * other.y - self.y * other.x # Пример перегрузки оператора "*" def __mul__(self, other): return self.x * other.y + self.y * other.y P = Point(input()) A = Point(input()) B = Point(input()) AB = Vector(A, B) AP = Vector(A, P) if AB % AP == 0 and AB * AP >= 0: print("YES") else: print("NO") print(AB)