#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
template<class Abel> struct UnionFind {
    vector<int> par;
    vector<int> rank;
    vector<Abel> diff_weight;

    UnionFind(int n = 1, Abel SUM_UNITY = 0) {
        init(n, SUM_UNITY);
    }

    void init(int n = 1, Abel SUM_UNITY = 0) {
        par.resize(n + 1); rank.resize(n + 1); diff_weight.resize(n + 1);
        for (int i = 0; i <= n; ++i) par[i] = i, rank[i] = 0, diff_weight[i] = SUM_UNITY;
    }

    int root(int x) {
        if (par[x] == x) {
            return x;
        }
        else {
            int r = root(par[x]);
            diff_weight[x] += diff_weight[par[x]];
            return par[x] = r;
        }
    }

    Abel weight(int x) {
        root(x);
        return diff_weight[x];
    }

    bool issame(int x, int y) {
        return root(x) == root(y);
    }

    bool merge(int x, int y, Abel w) {
        w += weight(x); w -= weight(y);
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y), w = -w;
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        diff_weight[y] = w;
        return true;
    }

    Abel diff(int x, int y) {
        return weight(y) - weight(x);
    }
};


int main() {
    //cout.precision(10);
    int r, c, n;
    cin >> r >> c >> n;
    UnionFind<ll> uni;
    uni.init(2 * c);
    map<int, vector<pair<int, ll> > > row;
    for(int i = 1; i <= n; i++){
        int a, b;
        ll c;
        cin >> a >> b >> c;
        pair<int, ll> in;
        in.first = b;
        in.second = c;
        row[a].push_back(in);
        if(row[a].size() == 1){
            continue;
        }
        pair<int, ll> out = row[a][0];
        if(!uni.issame(in.first, out.first)){
            //cout << in.first << " " << out.first << " " << in.second - out.second << endl;
            uni.merge(in.first, out.first, (in.second - out.second));
            continue;
        }
        //cout << uni.diff(in.first, out.first) << endl;
        //cout << in.second - out.second << endl;
        if(uni.diff(in.first, out.first) != (in.second - out.second)){
            cout << "No" << endl;
            return 0;
        }
    }
    map<int, vector<int> > children;
    for(int i = 1; i <= c; i++){
        int test = uni.root(i);
    }
    for(int i = 1; i <= c; i++){
        children[uni.root(i)].push_back(i);
    }
    int parent[100005];
    for(int i = 1; i <= n; i++){
        if(children[i].size() == 0){
            continue;
        }
        int mini = i;
        for(int j = 0; j < children[i].size(); j++){
            if(uni.diff(mini, children[i][j]) > 0){
                mini = children[i][j];
            }
        }
        for(int j = 0; j < children[i].size(); j++){
            parent[children[i][j]] = mini;
        }
    }
    /*for(int i = 1; i <= c; i++){
        cout << parent[i] << endl;
    }*/
    for(int i = 1; i <= r; i++){
        for(int j = 0; j < row[i].size(); j++){
            int point = row[i][j].first;
            ll value = row[i][j].second;
            if(uni.diff(point, parent[point]) > value){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
    /*int mini = 1;
    for(int i = 2; i <= c; i++){
        if(uni.diff(mini, i) > 0){
            mini = i;
        }
    }
    cout << mini << endl;*/
    return 0;
}

Measured memory_bytes: 25600