#include <bits/stdc++.h>

using namespace std;

void No() {
    cout << "No\n";
    exit(0);
}
void Yes() {
    cout << "Yes\n";
    exit(0);
}

struct Cell {
    int x, y, a;
};
bool operator < (Cell c1, Cell c2) {
    return c1.x < c2.x;
}

const long long INF = 1e18;
vector<vector<int> > gr, w;
vector<long long> p, comp;
int numComp;

bool dfs(int v) {
    comp[v] = numComp;    
	for (int i = 0; i < (int)gr[v].size(); ++i) {
        int nv = gr[v][i];
        int nw = p[v] + w[v][i];
        if (p[nv] == INF) {
            p[nv] = nw;
            if (!dfs(nv))
                return false;
        }
        else if (p[nv] != nw)
            return false;
    }
    return true;
}

int main() {
    ios_base::sync_with_stdio(0);
    int n, m, q;
    cin >> n >> m >> q;
    vector<Cell> qs;
    for (int i = 0; i < q; ++i) {
        int x, y, a;
        cin >> x >> y >> a;
        --x;
        --y;

        qs.push_back(Cell{x, y, a});
    }

    sort(qs.begin(), qs.end());
    gr.assign(m, vector<int>());
    w.assign(m, vector<int>());

    for (int i = 0; i + 1 < q; ++i)
        if (qs[i].x == qs[i+1].x) {
            gr[qs[i].y].push_back(qs[i+1].y);
            w[qs[i].y].push_back(qs[i+1].a - qs[i].a);
            gr[qs[i+1].y].push_back(qs[i].y);
            w[qs[i+1].y].push_back(qs[i].a - qs[i+1].a);
        }
    p.assign(m, INF);
    comp.assign(m, 0);
    numComp = 0;
    for (int i = 0; i < m; ++i)
        if (p[i] == INF) {
            p[i] = 0;
            ++numComp;
            if (!dfs(i))
                No();
        }
    vector<long long> minNums(numComp + 1, INF);
    for (int i = 0; i < q; ++i)
        minNums[comp[qs[i].y]] = min(minNums[comp[qs[i].y]], p[qs[i].y]);
    for (int i = 0; i < q; ++i)
        if (qs[i].a + minNums[comp[qs[i].y]] - p[qs[i].y] < 0)
            No();
    Yes();
    
    return 0;
}