func main() var n: int :: cui@input().toInt(&) var x: []int :: [2, 3, 7] var y: []int :: [8, 9, 9] for(1, n) var ss: [][]char :: cui@input().split(" ") var x1: int :: ss[0].toInt(&) var y1: int :: ss[1].toInt(&) var x2: int :: ss[2].toInt(&) var y2: int :: ss[3].toInt(&) for i(0, 2) if(x[i] = x1 & y[i] = y1) do x[i] :: x2 do y[i] :: y2 end if end for end for var ans: bool :: x[0] = 5 & x[1] = 4 & x[2] = 6 & y[0] = 8 & y[1] = 8 & y[2] = 8 do cui@print(ans ?("YES\n", "NO\n")) end func