import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

class Node{
	Node[] adjnodes;
	int i, j;
	long a;
	bool isDone = false;
	this(int i, int j, long a){
		this.i = i;
		this.j = j;
		this.a = a;
		}
	}

class NodeLine{
	Node[] nodes;
	bool isDone;
	bool isInStack;
	long value = 0;
	this(){
		}
	}

void main(){
	
	/*
	x[r, c] = a[r] + b[c] という形になることが条件
	
	順にうめていく。
	・最初の１個はa[r] = 0としてよい
	・途中で整合性がとれなかったら×
	・最後にマイナスになったら×
	*/
	
	long r, c;
	{
		long[] tmp = readln.chomp.split.map!(to!long).array;
		r = tmp[0], c = tmp[1];
		}
	
	int n = readln.chomp.to!int;
	
	NodeLine[] rows;
	NodeLine[] columns;
	foreach(i; 0 .. n) rows ~= new NodeLine;
	foreach(j; 0 .. n) columns ~= new NodeLine;
	
	Node[] nodes;
	foreach(_; 0 .. n){
		int i, j;
		long a;
		{
			long[] tmp = readln.chomp.split.map!(to!long).array;
			i = tmp[0].to!int - 1, j = tmp[1].to!int - 1, a = tmp[2];
			}
		Node nd = new Node(i, j, a);
		nodes ~= nd;
		rows[i].nodes ~= nd;
		columns[j].nodes ~= nd;
		}
	
	debug foreach(i; 0 .. n) rows[i].nodes.writeln;
	debug foreach(j; 0 .. n) columns[j].nodes.writeln;
	debug foreach(nd; nodes) nd.a.writeln;
	
	string ans;
	
	Node[] sta = [];
	while(nodes.length){
		Node nd;
		if(sta.length){
			nd = sta[$ - 1];
			sta = sta[0 .. $ - 1];
			}
		else if(nodes.length){
			nd = nodes[0];
			nodes = nodes[1 .. $];
			}
		
		if(nd.isDone) continue;
		
		if(!rows[nd.i].isInStack){
			sta ~= rows[nd.i].nodes;
			rows[nd.i].isInStack = true;
			}
		if(!columns[nd.j].isInStack){
			sta ~= columns[nd.j].nodes;
			columns[nd.j].isInStack = true;
			}
		
		debug writeln("> ", nd.i, " ", nd.j, " ", nd.a);
		
		if(!rows[nd.i].isDone && !columns[nd.j].isDone){
			rows[nd.i].value = 0, columns[nd.j].value = nd.a;
			debug writeln("A r[", nd.i, "]:=", rows[nd.i].value, ", c[", nd.j, "]:=", columns[nd.j].value);
			}
		else if(!rows[nd.i].isDone){
			rows[nd.i].value = nd.a - columns[nd.j].value;
			debug writeln("B r[", nd.i, "]:=", rows[nd.i].value, ", c[", nd.j, "]==", columns[nd.j].value);
			}
		else if(!columns[nd.j].isDone){
			columns[nd.j].value = nd.a - rows[nd.i].value;
			debug writeln("C r[", nd.i, "]==", rows[nd.i].value, ", c[", nd.j, "]:=", columns[nd.j].value);
			}
		else{
			debug writeln("D r[", nd.i, "]==", rows[nd.i].value, ", c[", nd.j, "]==", columns[nd.j].value);
			if(rows[nd.i].value + columns[nd.j].value != nd.a){
				debug writeln("Inconsistent");
				ans = "No";
				break;
				}
			}
		
		nd.isDone = true;
		rows[nd.i].isDone = true;
		columns[nd.j].isDone = true;
		}
	
	debug rows.map!(x => x.value).array.writeln;
	debug columns.map!(x => x.value).array.writeln;
	
	if(ans != "No" && rows.map!(x => x.value).reduce!min + columns.map!(x => x.value).reduce!min >= 0) ans = "Yes";
	else ans = "No";

	
	ans.writeln;
	
	
	}