#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <unordered_map>

using namespace std;

typedef pair<long long int, long long int> P;
typedef pair<P, long long int> P2;

long long int INF = 1e18;
long long int MOD = 1e9 + 7;

#define MAX_N 210000

int par[MAX_N];
int rnk[MAX_N];
long long int diff[MAX_N]; // {親の値} = {頂点iの値} + diff[i]
long long int min_cost[MAX_N];

// 初期化
void init(){
	for(int i = 0; i < MAX_N; i++){
		par[i] = i;
		rnk[i] = 0;
		diff[i] = 0;
	}
}

// x の親と、親までの diff の合計値を返す
P find(int x){
	P p;
	if(par[x] == x){
		p.first = x;
		p.second = 0;
		return p;
	}
	p = find(par[x]);
	diff[x] += p.second;
	p.second = diff[x];
	par[x] = p.first;
	return p;
}

// x と y を併合する、 y - x == z
bool unite(int x, int y, int z){
	P px = find(x);
	P py = find(y);
	int x_par = px.first;
	int y_par = py.first;
	if(x_par == y_par){
        //cout << px.second << " " << py.second << " " << z << endl;
		return (px.second == py.second + z);
	}
	
	if(rnk[x_par] < rnk[y_par]){
		par[x_par] = y_par;
		diff[x_par] = diff[y_par] - px.second + py.second + z;
	}else{
		par[y_par] = x_par;
		diff[y_par] = diff[x_par] + px.second - py.second - z;
		if(rnk[x_par] == rnk[y_par]){
			rnk[x_par]++;
		}
	}
    return true;
}

// x, y が同じグループか判定
bool same(int x, int y){
	P px = find(x);
	P py = find(y);
	int x_par = px.first;
	int y_par = py.first;
	return (x_par == y_par);
}

int main(){
    int R, C, N;
    cin >> R >> C >> N;
    vector<P2> v;
    for(int i = 0; i < N; i++){
        long long int r, c, a;
        cin >> r >> c >> a;
        v.push_back(P2(P(r, c), a));
    }
    sort(v.begin(), v.end());
    init();

    P2 v_pre = v[0];
    for(int i = 1; i < N; i++){
        if(v_pre.first.first != v[i].first.first){
            v_pre = v[i];
        }else{
            bool flag = unite(v_pre.first.second, v[i].first.second, v[i].second - v_pre.second);
            if(!flag){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    long long int OFF = 101000;
    for(int i = 0; i < N; i++){
        swap(v[i].first.first, v[i].first.second);
    }
    sort(v.begin(), v.end());
    v_pre = v[0];
    for(int i = 1; i < N; i++){
        if(v_pre.first.first != v[i].first.first){
            v_pre = v[i];
        }else{
            bool flag = unite(v_pre.first.second + OFF, v[i].first.second + OFF, v[i].second - v_pre.second);
            if(!flag){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    for(int i = 0; i < 210000; i++){
        min_cost[i] = INF;
    }
    for(int i = 0; i < 210000; i++){
        P p = find(i);
        min_cost[p.first] = min(min_cost[p.first], -p.second);
    }
    for(int i = 0; i < N; i++){
        swap(v[i].first.first, v[i].first.second);
        int r = v[i].first.first + OFF, c = v[i].first.second;
        P rp = find(r), cp = find(c);
        
        if(v[i].second + rp.second + min_cost[rp.first] < 0){
            cout << "No" << endl;
            return 0;
        }
        if(v[i].second + cp.second + min_cost[cp.first] < 0){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

Measured memory_bytes: 8176