import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    } main {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    } int res = -1; res -1 1 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        } int i = 0; int i = 0; i 0 i<1010 i 1010 i++ i++ i {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        } {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        } if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            } (int)(i*0.1) == B && (int)(i*0.08)==A (int)(i*0.1) == B (int)(i*0.1) i 0.1 B (int)(i*0.08)==A (int)(i*0.08) i 0.08 A {
                res = i;
                break;
            } res = i res i break; System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} Main
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
    	int res = -1;
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        for(int i = 0;i<1010;i++) {
            if((int)(i*0.1) == B && (int)(i*0.08)==A){
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
}