module primetest(p, a, b, ok); input [15:0] p, a, b; output ok = p != a*b || a == 1 || b == 1; endmodule