import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;
import ru.ifmo.testlib.Outcome.Type;

public class Check implements Checker {
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        int jury = ans.nextInt(), part = ouf.nextInt();
        if (jury != part) {
            return new Outcome(Type.WA, "Wrong count: expected " + jury + ", but found " + part);
        }
        for (int i = 0; i < jury; i++) {
            int juryNumber = ans.nextInt();
            int partNumber = ouf.nextInt();
            if (juryNumber != partNumber) {
                    return new Outcome(Type.WA, "Bad number " + (i + 1) + " - expected " + jury + ", but found " + part);
            }
        }
        return new Outcome(Type.OK, jury + " bad numbers");
    }
}
