  Module A
  
  Sub main()
  
'  Set Console = New Console
  
    Dim N As Long
    Dim i As Long
    Dim RD As String
    Dim SD() As String
    Dim tnow As Long
    Dim xnow As Long
    Dim ynow As Long
    Dim tfut As Long
    Dim xfut As Long
    Dim yfut As Long
    Dim dist As Long
    Dim elap As Long
    
    Dim ans As String
    
    tnow = 0
    xnow = 0
    ynow = 0
    
    N = Console.Readline()
    For i = 1 To N
        RD = Console.Readline()
        SD = Split(RD, " ")
        tfut = clng(SD(0))
        xfut = clng(SD(1))
        yfut = clng(SD(2))
    
        elap = tfut - tnow
        dist = System.Math.abs(xnow - xfut) + System.Math.abs(ynow - yfut)
    
        If elap < dist Then
            ans = "No"
            Exit For
        End If
    
        If ((elap - dist) Mod 2) = 1 Then
            ans = "No"
            Exit For
        End If
        
        tnow = tfut
        xnow = xfut
        ynow = yfut
  Next    

   
	  If ans = "" Then
	    ans = "Yes"
	  End If
  
	  Console.Writeline(ans)
  
  End Sub

End module	
