import ru.ifmo.testlib.*;

import java.math.BigInteger;

import static ru.ifmo.testlib.Outcome.Type.*;

public class Check implements Checker {
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        int testsNumber = inf.nextInt();
        for (int test = 1; test <= testsNumber; test++) {
            long L = inf.nextLong();
            long R = inf.nextLong();
            BigInteger ja = ans.nextBigInteger();
            BigInteger pa = ouf.nextBigInteger();
            if (!ja.equals(pa)) {
                return new Outcome(Outcome.Type.WA, "[L, R] =  [" + L + ", " + R + "], expected: " + ja + ", found: " + pa);
            }
        }

        return new Outcome(Outcome.Type.OK, "");
    }
}
