import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array;

void main() {
    int a, b;
    scan(a, b);

    auto d = new int[][](a + 1, b + 1);

    iota(1, a + 1).each!(i => d[i][1 .. $] = readln.split.to!(int[]));

    debug {
        writefln("%(%(%s %)\n%)", d);
    }

    auto c = new int[][](101, 101);

    foreach (i ; 0 .. 101) {
        foreach (j ; 0 .. 101) {
            foreach (x ; 1 .. a + 1) {
                foreach (y ; 1 .. b + 1) {
                    c[i][j] = max(c[i][j], d[x][y] - i*x - j*y);
                }
            }
        }
    }

    foreach (x ; 1 .. a + 1) {
        foreach (y ; 1 .. b + 1) {
            int dt = 101;

            foreach (i ; 0 .. 101) {
                foreach (j ; 0 .. 101) {
                    dt = min(dt, i*x + j*y + c[i][j]);
                }
            }

            if (d[x][y] != dt) {
                writeln("Impossible");
                return;
            }
        }
    }

    writeln("Possible");
    writeln(202, " ", 100 + 100 + 101*101);

    foreach (i ; 0 .. 100) {
        writeln(i + 1, " ", i + 2, " ", 'X');
        writeln(102 + i, " ", 102 + i + 1, " ", 'Y');
    }

    foreach (i ; 0 .. 101) {
        foreach (j ; 0 .. 101) {
            writeln(1 + i, " ", 201 - j, " ", c[i][j]);
        }
    }

    writeln(0, " ", 201);
}




void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}