import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9 + 7;


void main() {
    auto s = readln.split.map!(to!int);
    auto R = s[0];
    auto C = s[1];
    auto N = readln.chomp.to!int;
    auto A = new Tuple!(int, long)[][](R);

    foreach (i; 0..N) {
        s = readln.split.map!(to!int);
        auto r = s[0] - 1;
        auto c = s[1] - 1;
        auto a = s[2].to!long;
        A[r] ~= tuple(c, a);
    }

    foreach (i; 0..R) A[i].sort!"a[0] < b[0]";

    long d = 1L << 59;
    foreach (i; 0..R) {
        if (A[i].length < 2) continue;
        long x = A[i][1][1] - A[i][0][1];
        long y = A[i][1][0] - A[i][0][0];
        if (x % y != 0) {
            writeln("No");
            return;
        }
        d = x / y;
        break;
    }

    if (d == 1L << 59) {
        writeln("Yes");
        return;
    }

    foreach (i; 0..R) {
        if (A[i].length == 0) continue;
        long first = A[i][0][1] - d * A[i][0][0];
        long last = A[i][0][1] + d * (C - A[i][0][0] - 1);
        if (first < 0 || last < 0) {
            writeln("No");
            return;
        }

        foreach (a; A[i]) {
            long b = first + d * a[0];
            if (a[1] != b) {
                writeln("No");
                return;
            }
        }
    }

    writeln("Yes");
}
