import ru.ifmo.testlib.*;

import java.lang.Math;

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

public class Check implements Checker {
    final double EPS = 1e-6;
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
    	int n = inf.nextInt();
    	for (int i = 0; i < 2*n; i++)
    		inf.nextInt();
    	int m = inf.nextInt();
        for (int i = 0; i < 2*m; i++){
            double ja = ans.nextDouble();
            double pa = ouf.nextDouble();
            if (Math.abs(ja - pa) > EPS*Math.max(1, ja))
                return new Outcome(Outcome.Type.WA, "Expected " + ja + " found "+ pa +
                        "(error is "+(Math.abs(ja - pa)/Math.max(1,ja))+")");
        }
        return new Outcome(Outcome.Type.OK, "");
    }
}
