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

void main() {
    auto tmp = readln.split.to!(long[]);
    writeln(tmp.all!(t => t < 10) ? tmp[0] * tmp[1] : -1);
}

