#include <iostream>
#include <cstdio>
#include <string>
#include <string.h>
#include <queue>
#include <math.h>
#include <cmath>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <bitset>
#include <list>
#include <ctype.h>
#include <cassert>
#include <stack>
#include <fstream>
#include <unordered_map>
#include <unordered_set>
#include <ctime>
#include <functional>
#include <ctime>
#include <limits>
#include <tuple>
#include <complex>
#include <numeric>

using namespace std;

#define snd second
#define fst first
#define mp make_pair
#define ll long long
#define ull unsigned long long
#define ld long double
#define pb push_back
#define left _left
#define right _right

const ld pi = acos(-1.0l);

template<typename T>
T abs(T x) {
    return x > 0 ? x : -x;
}

template<typename T>
T sqr(T x) {
    return x * x;
}

template<typename T>
bool chmin(T &x, T y) {
    if (x > y) {
        x = y;
        return true;
    }
    return false;
}

template<typename T>
bool chmax(T &x, T y) {
    if (x < y) {
        x = y;
        return true;
    }
    return false;
}

template<typename U, typename V>
ostream &operator<<(ostream &s, const pair<U, V> &x) {
    s << "(" << x.fst << ", " << x.snd << ")";
    return s;
}

template<typename U>
ostream &operator<<(ostream &s, const vector<U> &x) {
    s << "[";
    bool was = false;
    for (auto it : x) {
        if (was) {
            s << ", ";
        }
        was = true;
        s << it;
    }
    s << "]";
    return s;
}

template<typename U>
ostream &operator<<(ostream &s, const set<U> &x) {
    s << "{";
    bool was = false;
    for (auto it : x) {
        if (was) {
            s << ", ";
        }
        was = true;
        s << it;
    }
    s << "}";
    return s;
}

template<int sz>
ostream operator<<(ostream &s, const bitset<sz> &x) {
    for (int i = 0; i < sz; i++) {
        s << x[i];
    }
    return s;
}


//-----------------------------------------------------------------------------

const int maxn = 1e5 + 5;
vector<pair<int, ll>> g[maxn];
ll val[maxn];
ll det[maxn];
ll horM[maxn];
ll colM[maxn];
vector<int> vis;
ll mm = 1e18;

void dfs(int v, ll c) {
    val[v] = c;
    det[v] = 1;
    vis.pb(v);
    chmin(mm, c);
    for (auto to : g[v]) {
        if (!det[to.fst]) {
            dfs(to.fst, c + to.snd);
        } else {
            if (val[to.fst] != c + to.snd) {
                cout << "No" << endl;
                exit(0);
            }
        }
    }
}

int main() {
    srand(time(NULL));

    retry:
#ifdef LOCAL
    // gen();

    freopen("a.in", "r", stdin);
    //freopen("a.out", "w", stdout);
#else
    //freopen(".in", "r", stdin);
    //freopen(".out", "w", stdout);
#endif

    int r, c;
    scanf("%d %d", &r, &c);

    int n;
    scanf("%d", &n);

    map<int, vector<pair<int, ll>>> hor, vert;
    map<int, int> minHor, minVert;
    vector<pair<pair<int,int>, int>> a;
    for (int i = 0; i < n; i++) {
        int x, y, v;
        scanf("%d %d %d", &x, &y, &v);
        a.pb(mp(mp(x, y), v));
        hor[x].pb(mp(y, v));
        vert[y].pb(mp(x, v));
    }

    fill(val, val + maxn, 0);
    fill(det, det + maxn, 0);
    for (int i = 0; i < maxn; i++) {
        g[i].clear();
    }

    for (auto kv : hor) {
        sort(kv.snd.begin(), kv.snd.end());
        for (int i = 0; i + 1 < kv.snd.size(); i++) {
            g[kv.snd[i].fst].pb(mp(kv.snd[i + 1].fst, kv.snd[i + 1].snd - kv.snd[i].snd));
            g[kv.snd[i + 1].fst].pb(mp(kv.snd[i].fst, - kv.snd[i + 1].snd + kv.snd[i].snd));
        }
    }

    for (int i = 0; i < maxn; i++) {
        if (!det[i]) {
            vis.clear();
            mm = 1e18;
            dfs(i, 0);

            for (int x : vis) {
                horM[x] = mm;
            }
        }
    }

    fill(colM, colM + maxn, 1e18);

    for (auto p : a) {
        if (horM[p.fst.snd] - (val[p.fst.snd] - p.snd) < 0) {
            cout << "No" << endl;
            return 0;
        }

        chmin(colM[p.fst.fst], horM[p.fst.snd] - (val[p.fst.snd] - p.snd));
    }

    fill(val, val + maxn, 0);
    fill(det, det + maxn, 0);
    for (int i = 0; i < maxn; i++) {
        g[i].clear();
    }

    for (auto kv : vert) {
        sort(kv.snd.begin(), kv.snd.end());
        for (int i = 0; i + 1 < kv.snd.size(); i++) {
            g[kv.snd[i].fst].pb(mp(kv.snd[i + 1].fst, kv.snd[i + 1].snd - kv.snd[i].snd));
            g[kv.snd[i + 1].fst].pb(mp(kv.snd[i].fst, - kv.snd[i + 1].snd + kv.snd[i].snd));
        }
    }


    for (int i = 0; i < maxn; i++) {
        if (!det[i]) {
            vis.clear();
            mm = 1e18;
            dfs(i, 0);

            for (int x : vis) {
                if (mm - (val[x] - colM[x]) < 0) {
                    cout << "No" << endl;
                    return 0;
                }
            }
        }
    }

    cout << "Yes" << endl;

    return 0;
}

Measured memory_bytes: 28724