import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    }
} Main public static void main(String[] args) {

        new Main().solve();
    } main {

        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args void solve(){

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    } solve {

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    } int a a b; b Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = Integer.parseInt(sc.next()) a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc b = Integer.parseInt(sc.next()) b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc double ataxfreemax ataxfreemax ataxfreemin; ataxfreemin double btaxfreemax btaxfreemax btaxfreemin; btaxfreemin ataxfreemax = (a + 1) / 0.08 ataxfreemax (a + 1) / 0.08 (a + 1) a 1 0.08 ataxfreemin = a / 0.08 ataxfreemin a / 0.08 a 0.08 btaxfreemax = (b + 1) / 0.1 btaxfreemax (b + 1) / 0.1 (b + 1) b 1 0.1 btaxfreemin = b / 0.1 btaxfreemin b / 0.1 b 0.1 int amax amax amin; amin if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        } Math.floor(ataxfreemax) == ataxfreemax Math.floor(ataxfreemax) Math.floor Math ataxfreemax ataxfreemax {
            amax = (int) ataxfreemax - 1;
        } amax = (int) ataxfreemax - 1 amax (int) ataxfreemax - 1 (int) ataxfreemax 1 {
            amax = (int) ataxfreemax;
        } amax = (int) ataxfreemax amax (int) ataxfreemax if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        } Math.ceil(ataxfreemin) == ataxfreemin Math.ceil(ataxfreemin) Math.ceil Math ataxfreemin ataxfreemin {
            amin = (int) ataxfreemin;
        } amin = (int) ataxfreemin amin (int) ataxfreemin {
            amin = (int) ataxfreemin + 1;
        } amin = (int) ataxfreemin + 1 amin (int) ataxfreemin + 1 (int) ataxfreemin 1 int bmax bmax bmin; bmin if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        } Math.floor(btaxfreemax) == btaxfreemax Math.floor(btaxfreemax) Math.floor Math btaxfreemax btaxfreemax {
            bmax = (int) btaxfreemax - 1;
        } bmax = (int) btaxfreemax - 1 bmax (int) btaxfreemax - 1 (int) btaxfreemax 1 {
            bmax = (int) btaxfreemax;
        } bmax = (int) btaxfreemax bmax (int) btaxfreemax if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        } Math.ceil(btaxfreemin) == btaxfreemin Math.ceil(btaxfreemin) Math.ceil Math btaxfreemin btaxfreemin {
            bmin = (int) btaxfreemin;
        } bmin = (int) btaxfreemin bmin (int) btaxfreemin {
            bmin = (int) btaxfreemin + 1;
        } bmin = (int) btaxfreemin + 1 bmin (int) btaxfreemin + 1 (int) btaxfreemin 1 if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        } amax>bmax && bmax>amin amax>bmax amax bmax bmax>amin bmax amin {
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        } if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            } bmin>amin bmin amin {
                System.out.println(bmin);
            } System.out.println(bmin) System.out.println System.out System System.out bmin {
                System.out.println(amin);
            } System.out.println(amin) System.out.println System.out System System.out amin if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        } amax>bmin && bmin>amin amax>bmin amax bmin bmin>amin bmin amin {
            System.out.println(bmin);
        } System.out.println(bmin) System.out.println System.out System System.out bmin if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        } bmax>amax && amax>bmin bmax>amax bmax amax amax>bmin amax bmin {
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        } if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            } amin>bmin amin bmin {
                System.out.println(amin);
            } System.out.println(amin) System.out.println System.out System System.out amin {
                System.out.println(bmin);
            } System.out.println(bmin) System.out.println System.out System System.out bmin if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        } bmax>amin && amin>bmin bmax>amin bmax amin amin>bmin amin bmin {
            System.out.println(amin);
        } System.out.println(amin) System.out.println System.out System System.out amin {
            System.out.println("-1");
        } System.out.println("-1") System.out.println System.out System System.out "-1" public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    }
} public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    }
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

        new Main().solve();
    }

    void solve(){

        int a, b;

        Scanner sc = new Scanner(System.in);
        a = Integer.parseInt(sc.next());
        b = Integer.parseInt(sc.next());
        sc.close();

        double ataxfreemax, ataxfreemin; 
        double btaxfreemax, btaxfreemin;

        ataxfreemax = (a + 1) / 0.08;
        ataxfreemin = a / 0.08;
        btaxfreemax = (b + 1) / 0.1;
        btaxfreemin = b / 0.1;

        int amax, amin;
        if (Math.floor(ataxfreemax) == ataxfreemax){
            amax = (int) ataxfreemax - 1;
        }
        else {
            amax = (int) ataxfreemax;
        }

        if(Math.ceil(ataxfreemin) == ataxfreemin){
            amin = (int) ataxfreemin;
        }
        else{
            amin = (int) ataxfreemin + 1;
        }

        int bmax, bmin;
        if (Math.floor(btaxfreemax) == btaxfreemax){
            bmax = (int) btaxfreemax - 1;
        }
        else {
            bmax = (int) btaxfreemax;
        }

        if(Math.ceil(btaxfreemin) == btaxfreemin){
            bmin = (int) btaxfreemin;
        }
        else{
            bmin = (int) btaxfreemin + 1;
        }

        if(amax>bmax && bmax>amin){
            if(bmin>amin){
                System.out.println(bmin);
            }
            else{
                System.out.println(amin);
            }
        }
        else if(amax>bmin && bmin>amin){
            System.out.println(bmin);
        }
        else if(bmax>amax && amax>bmin){
            if(amin>bmin){
                System.out.println(amin);
            }
            else{
                System.out.println(bmin);
            }
        }
        else if(bmax>amin && amin>bmin){
            System.out.println(amin);
        }
        else{
            System.out.println("-1");
        }
    }
}