Module Module1

    Structure rca
        Dim r As Integer
        Dim c As Integer
        Dim a As Integer
    End Structure
    Dim N As Integer
    Dim List As New List(Of rca)

    Sub Main()
        Dim t1() As String = Split(Console.ReadLine())
        Dim r As Integer = Val(t1(0)) - 1
        Dim c As Integer = Val(t1(1)) - 1
        N = Val(Console.ReadLine())

        For i As Integer = 0 To N - 1
            Dim tempList As rca
            Dim t2() As String = Split(Console.ReadLine())
            tempList.r = t2(0) - 1
            tempList.c = t2(1) - 1
            tempList.a = t2(2)
            List.Add(tempList)
        Next

        Dim result As Boolean = True
        Dim row(r - 1) As Integer
        For i As Integer = 0 To r - 1
            row(i) = -1
        Next
        For i As Integer = 0 To N - 1
            Dim _r As Integer = List(i).r
            Dim _c As Integer = List(i).c
            If _r = r Then Continue For
            If row(_r) = -1 Then
                If a(_r + 1, _c) = -1 Then Continue For
                row(_r) = a(_r + 1, _c) - a(_r, _c)
            Else
                If (a(_r + 1, _c) = -1 And a(_r, _c) + row(_r) < 0) Or (a(_r + 1, _c) <> -1 And row(_r) <> a(_r + 1, _c) - a(_r, _c)) Then
                    result = False
                    Exit For
                End If
            End If
        Next
        If result = True Then
            Console.WriteLine("Yes")
        Else
            Console.WriteLine("No")
        End If
        Stop
    End Sub

    Function a(_r As Integer, _c As Integer)
        For i As Integer = 0 To N - 1
            If List(i).r = _r And List(i).c = _c Then Return List(i).a
        Next
        Return -1
    End Function

End Module
