#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long LL;
typedef pair<int,int> PII;

typedef pair<int, LL> PIL;

#define MP make_pair
#define PB push_back
#define FF first
#define SS second

#define FORN(i, n) for (int i = 0; i <  (int)(n); i++)
#define FOR1(i, n) for (int i = 1; i <= (int)(n); i++)
#define FORD(i, n) for (int i = (int)(n) - 1; i >= 0; i--)

#define DEBUG(X) { cout << #X << " = " << (X) << endl; }
#define PR0(A,n) { cout << #A << " = "; FORN(_,n) cout << A[_] << ' '; cout << endl; }

#define MOD 1000000007
#define INF 2000000000

int GLL(LL& x) {
    return scanf("%lld", &x);
}

int GI(int& x) {
    return scanf("%d", &x);
}

const int MAXN = 100010;
int visited[MAXN]; LL pos[MAXN], cmin[MAXN], rmin[MAXN];

int r, c, n;

vector< vector<PIL> > row, col;
vector< vector<PIL> > radj, cadj;

vector<int> component; LL low;

bool dfs(int u, vector< vector<PIL> >& adj) {
    visited[u] = 1; component.PB(u); low = min(low, pos[u]);

    for (auto& v : adj[u]) {
        if (visited[v.FF]) {
            if (pos[v.FF] - pos[u] != v.SS) return false;
        }
        else {
            pos[v.FF] = pos[u] + v.SS;
            if (!dfs(v.FF, adj)) return false;
        }
    }

    return true;
}

int main() {
    GI(r); GI(c); GI(n); int x, y, a;

    row.resize(r+1);
    col.resize(c+1);

    FORN(i, n) {
        GI(x); GI(y); GI(a);

        row[x].PB(MP(y, a));
        col[y].PB(MP(x, a));
    }

    radj.resize(c+1);
    cadj.resize(r+1);

    for (auto& rv : row) {
        sort(rv.begin(), rv.end());

        FORN(i, rv.size() - 1) {
            radj[rv[i].FF].PB(MP(rv[i+1].FF, rv[i+1].SS - rv[i].SS));
            radj[rv[i+1].FF].PB(MP(rv[i].FF, rv[i].SS - rv[i+1].SS));
        }
    }
    
    for (auto& cv : col) {
        sort(cv.begin(), cv.end());

        FORN(i, cv.size() - 1) {
            cadj[cv[i].FF].PB(MP(cv[i+1].FF, cv[i+1].SS - cv[i].SS));
            cadj[cv[i+1].FF].PB(MP(cv[i].FF, cv[i].SS - cv[i+1].SS));
        }
    }

    memset(visited, 0, sizeof visited);
    memset(pos, 0, sizeof pos);
    
    FOR1(i, c) {
        if (!visited[i]) {
            vector<int>().swap(component); low = 0;

            if (!dfs(i, radj)) {
                cout << "No\n";
                return 0;
            }

            for (auto u : component) cmin[u] = pos[u] - low;
        }
    }

    memset(visited, 0, sizeof visited);
    memset(pos, 0, sizeof pos);

    FOR1(i, r) {
        if (!visited[i]) {
            vector<int>().swap(component); low = 0;

            if (!dfs(i, cadj)) {
                cout << "No\n";
                return 0;
            }

            for (auto u : component) rmin[u] = pos[u] = low;
        }
    }

    // check minimums

    FOR1(i, r) {
        for (auto& ja : row[i]) {
            if (ja.SS < cmin[ja.FF] || ja.SS < rmin[i]) {
                cout << "No\n";
                return 0;
            }
        }
    }

    cout << "Yes\n";
    return 0;
}

Measured memory_bytes: 25404