import java.util.*;

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

public class Check implements Checker {
    @Override
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        int cntP = ouf.nextInt();
        int cntJ = ans.nextInt();
        if (cntP != cntJ)
            return new Outcome(Type.WA, "Max length: " + cntJ + " expected, but" + cntP + " found.");
        for (int i = 0; i < cntP; i++) {
            long ansP = ouf.nextLong();
            long ansJ = ans.nextLong();
            if (ansP != ansJ)
                return new Outcome(Type.WA, "Answer differ for len="+(i+1)+": "+ansJ + " expected, but "+ ansP + " found.");
        }
        return new Outcome(Type.OK, "Ok");
    }
}
