import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-1);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-1);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-1);
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-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 int price = 0; price 0 boolean judge = false; judge false for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        } int i=1; int i=1; i 1 i<=1000 i 1000 i++ i++ i {
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        } {
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        } price = i price i if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            } Math.floor(price*0.08) == A && Math.floor(price*0.1) == B Math.floor(price*0.08) == A Math.floor(price*0.08) Math.floor Math price*0.08 price 0.08 A Math.floor(price*0.1) == B Math.floor(price*0.1) Math.floor Math price*0.1 price 0.1 B {
                judge = true;
                break;
            } judge = true judge true break; if(judge) System.out.println(price);
        else System.out.println(-1); judge System.out.println(price) System.out.println System.out System System.out price 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 sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-1);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-1);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int price = 0;
        boolean judge = false;
        
        for(int i=1; i<=1000; i++){
            price = i;
            if(Math.floor(price*0.08) == A && Math.floor(price*0.1) == B){
                judge = true;
                break;
            }
        }
        
        if(judge) System.out.println(price);
        else System.out.println(-1);
    }
}
