
import java.util.Scanner;

public class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] arg){
        Main m = new Main();
        m.run();
    }

    void run(){
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

        if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] arg){
        Main m = new Main();
        m.run();
    }

    void run(){
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

        if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        }
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] arg){
        Main m = new Main();
        m.run();
    } main {
        Main m = new Main();
        m.run();
    } Main m = new Main(); m new Main() m.run() m.run m String[] arg arg void run(){
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

        if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        }
    } run {
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

        if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        }
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int amin = ((a) * 100 + 7)/ 8; amin ((a) * 100 + 7)/ 8 ((a) * 100 + 7) (a) * 100 (a) 100 7 8 int amax = ((a+1) * 100 )/ 8; amax ((a+1) * 100 )/ 8 ((a+1) * 100 ) (a+1) a 1 100 8 int bmin = ((b) * 100 + 9)/ 10; bmin ((b) * 100 + 9)/ 10 ((b) * 100 + 9) (b) * 100 (b) 100 9 10 int bmax = ((b+1) * 100 )/ 10; bmax ((b+1) * 100 )/ 10 ((b+1) * 100 ) (b+1) b 1 100 10 if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        } bmin <= amin && amin < bmax bmin <= amin bmin amin amin < bmax amin bmax {
            System.out.println(amin);
        } System.out.println(amin) System.out.println System.out System System.out amin if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        } amin <= bmin && bmin < amax amin <= bmin amin bmin bmin < amax bmin amax {
            System.out.println(bmin);
        } System.out.println(bmin) System.out.println System.out System System.out bmin {
            System.out.println(-1);
        } System.out.println(-1) System.out.println System.out System System.out -1 1 public class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] arg){
        Main m = new Main();
        m.run();
    }

    void run(){
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

        if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        }
    }
} public class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] arg){
        Main m = new Main();
        m.run();
    }

    void run(){
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

        if (bmin <= amin && amin < bmax){
            System.out.println(amin);
        }else if (amin <= bmin && bmin < amax){
            System.out.println(bmin);
        }else{
            System.out.println(-1);
        }
    }
} Main

import java.util.Scanner;

public class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] arg){
        Main m = new Main();
        m.run();
    }

    void run(){
        int a = sc.nextInt();
        int b = sc.nextInt();

        int amin = ((a) * 100 + 7)/ 8;
        int amax = ((a+1) * 100 )/ 8;

        int bmin = ((b) * 100 + 9)/ 10;
        int bmax = ((b+1) * 100 )/ 10;

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