import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int M = scanner.nextInt(); M scanner.nextInt() scanner.nextInt scanner for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        } int x = 1; int x = 1; x 1 x<10000 x 10000 x++ x++ x {

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        } {

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        } if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            } (int) (x*0.08)==N && (int) (x*0.1)==M (int) (x*0.08)==N (int) (x*0.08) x 0.08 N (int) (x*0.1)==M (int) (x*0.1) x 0.1 M {
                System.out.println(x);
                return;
            } System.out.println(x) System.out.println System.out System System.out x return; System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    }

} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        for(int x = 1; x<10000;x++){

            if((int) (x*0.08)==N && (int) (x*0.1)==M){
                System.out.println(x);
                return;
            }
        }
        System.out.println(-1);



    }

}
