/+ dub.sdl:
    name "A"
    dependency "dcomp" version=">=0.4.0"
+/

import std.stdio, std.algorithm, std.conv, std.range;
import std.container.rbtree;

// import dcomp.scanner;

int main() {
    auto sc = new Scanner(stdin);
    int n, m, q;
    int[] a;
    sc.read(n, m, q, a);

    bool solve() {
        int[] res;
        bool[] used = new bool[m];
        foreach_reverse (d; a) {
            d--;
            if (used[d]) continue;
            used[d] = true;
            res ~= d;
        }
        res ~= iota(m).filter!(i => !used[i]).array;
        int[] rres = new int[m]; res.each!((i, d) => rres[d] = i.to!int);

        auto tr = redBlackTree!(true)(repeat(0).take(n).array);

        foreach_reverse (d; a) {
            d--;
            int id = rres[d];
//            writeln(tr);
            if (id in tr) {
                tr.removeKey(id);
                tr.insert(id+1);
            } else if (tr.upperBound(id).empty) {
                return false;
            }
        }
//        writeln(tr);
        int r = iota(m).filter!(i => (i==0 || res[i-1] > res[i])).array.back;
        return tr.lowerBound(r).empty;
    }

    if (solve()) {
        writeln("Yes");
    } else {
        writeln("No");
    }
    return 0;
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/scanner.d */
// module dcomp.scanner;

class Scanner {
    import std.stdio : File;
    import std.conv : to;
    import std.range : front, popFront, array, ElementType;
    import std.array : split;
    import std.traits : isSomeChar, isStaticArray, isArray; 
    import std.algorithm : map;
    File f;
    this(File f) {
        this.f = f;
    }
    string[] buf;
    private bool succ() {
        while (!buf.length) {
            if (f.eof) return false;
            buf = f.readln.split;
        }
        return true;
    }
    private bool readSingle(T)(ref T x) {
        if (!succ()) return false;
        static if (isArray!T) {
            alias E = ElementType!T;
            static if (isSomeChar!E) {
                //string or char[10] etc
                x = buf.front;
                buf.popFront;
            } else {
                static if (isStaticArray!T) {
                    //static
                    assert(buf.length == T.length);
                }
                x = buf.map!(to!E).array;
                buf.length = 0;                
            }
        } else {
            x = buf.front.to!T;
            buf.popFront;            
        }
        return true;
    }
    int read(T, Args...)(ref T x, auto ref Args args) {
        if (!readSingle(x)) return 0;
        static if (args.length == 0) {
            return 1;
        } else {
            return 1 + read(args);
        }
    }
}

unittest {
    import std.path : buildPath;
    import std.file : tempDir;
    import std.algorithm : equal;
    import std.stdio : File;
    string fileName = buildPath(tempDir, "kyuridenanmaida.txt");
    auto fout = File(fileName, "w");
    fout.writeln("1 2 3");
    fout.writeln("ab cde");
    fout.writeln("1.0 1.0 2.0");
    fout.close;
    Scanner sc = new Scanner(File(fileName, "r"));
    int a;
    int[2] b;
    char[2] c;
    string d;
    double e;
    double[] f;
    sc.read(a, b, c, d, e, f);
    assert(a == 1);
    assert(equal(b[], [2, 3]));
    assert(equal(c[], "ab"));
    assert(equal(d, "cde"));
    assert(e == 1.0);
    assert(equal(f, [1.0, 2.0]));
}


Measured memory_bytes: 10676