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

import java.util.*;
import java.math.*;

public class Check implements Checker {
    public static final double EPS = 2e-6;

    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        double ja = ans.nextDouble();
        double pa = ouf.nextDouble();
        boolean ok = Math.abs(ja - pa) / Math.max(ja, 1) < EPS;
        if (ok) {
            return new Outcome(Type.OK, "" + pa);
        } else {
            return new Outcome(Type.WA, String.format("Expected: %f, found: %f", ja, pa));
        }
    }
}
