import ru.ifmo.validate.*;

public class Validate implements Validator {
    static final int MAX = 1000;

    @Override
    public void validate(ValidatingScanner in) {
        int a = in.nextInt(1, MAX);
        int b = in.nextInt(1, MAX);
        int c = in.nextInt(1, MAX);
        int d = in.nextInt(1, MAX);
        int e = in.nextInt(1, MAX);
        in.eoln();
        assert a <= b : "a <= b";
        assert d <= e : "d <= e";
        assert c - e >= a : "c - e >= a";
        assert c - d <= b : "c - d <= b";
    }
}