#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

template <class T>
class UnionFindTree
{
private:
    const int n;
    vector<pair<int, T> > parent; // 親ノード
    vector<int> rank;             // 木の高さの上限

    pair<int, T> find(int x){
        if(parent[x].first == x){
            return parent[x];
        }else{
            pair<int, T> p = find(parent[x].first);
            p.second += parent[x].second;
            return parent[x] = p;
        }
    }
public:
    UnionFindTree(int n) : n(n){ // コンストラクタ
        parent.resize(n);
        for(int i=0; i<n; ++i)
            parent[i] = make_pair(i, 0);
        rank.assign(n, 0);
    }
    bool unite(int a, int b, T diff){ // aとbのグループを併合
        pair<int, T> x = find(a);
        pair<int, T> y = find(b);
        a = x.first;
        b = y.first;
        if(a != b){
            if(rank[a] < rank[b]){
                parent[a] = make_pair(b, y.second - x.second + diff);
            }else{
                parent[b] = make_pair(a, x.second - y.second - diff);
                if(rank[a] == rank[b])
                    ++ rank[a];
            }
            return true;
        }
        else{
            return x.second - y.second == diff;
        }
    }
    pair<bool, T> getDiff(int a, int b){ // aとbの値の差を調べる
        pair<int, T> x = find(a);
        pair<int, T> y = find(b);
        if(x.first == y.first)
            return make_pair(true, x.second - y.second);
        else
            return make_pair(false, 0);
    }
    void getGroup(vector<vector<pair<int, T> > >& group){ // グループ構成を返す
        map<int, int> index;
        group.clear();
        for(int i=0; i<n; ++i){
            pair<int, T> p = find(i);
            int a = p.first;
            T diff = p.second;
            if(index.find(a) == index.end()){
                index[a] = group.size();
                group.resize(group.size() + 1);
            }
            group[index[a]].push_back(make_pair(i, -diff));
        }

        for(auto& v : group){
            auto comp = [](const auto& x, const auto& y){ return make_pair(x.second, x.first) < make_pair(y.second, y.first); };
            sort(v.begin(), v.end(), comp);
            T base = v[0].second;
            for(auto& p : v)
                p.second -= base;
        }
    }
};

class Data
{
public:
    int y, x, a;
    bool operator<(const Data& d){
        return x < d.x;
    }
};

int main()
{
    int h, w, n;
    cin >> h >> w >> n;

    vector<Data> v(n);
    for(int i=0; i<n; ++i){
        cin >> v[i].y >> v[i].x >> v[i].a;
        -- v[i].y;
        -- v[i].x;
    }

    vector<UnionFindTree<long long> > uft = { UnionFindTree<long long>(h), UnionFindTree<long long>(w) };
    for(int i=0; i<2; ++i){
        sort(v.begin(), v.end());
        for(int j=0; j<n-1; ++j){
            if(v[j].x == v[j+1].x){
                int diff = v[j+1].a - v[j].a;
                if(!uft[i].unite(v[j].y, v[j+1].y, diff)){
                    cout << "No" << endl;
                    return 0;
                }
            }
        }
        for(int j=0; j<n; ++j)
            swap(v[j].y, v[j].x);
    }

    vector<vector<vector<pair<int, long long> > > > group(2);
    vector<vector<long long> > diff(2);
    diff[0] = vector<long long>(h);
    diff[1] = vector<long long>(w);
    for(int i=0; i<2; ++i){
        uft[i].getGroup(group[i]);
        for(unsigned j=0; j<group[i].size(); ++j){
            for(unsigned k=0; k<group[i][j].size(); ++k){
                diff[i][group[i][j][k].first] = group[i][j][k].second;
            }
        }
    }

    for(int i=0; i<n; ++i){
        if(v[i].a - diff[0][v[i].y] - diff[1][v[i].x] < 0){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
    return 0;
}

Measured memory_bytes: 23352