import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    }
} Main public static void main(String[] args) {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    } main {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    } 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 ans = -1; ans -1 1 for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        } int i = 1; int i = 1; i 1 i <= 10000 i 10000 i++ i++ i {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        } {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        } if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                } (int)(i * 0.08) == a && 
                (int)(i * 0.10) == b (int)(i * 0.08) == a (int)(i * 0.08) i 0.08 a (int)(i * 0.10) == b (int)(i * 0.10) i 0.10 b {
                    ans = i;
                    break;
                } ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // ABC158C - Tax Increase

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = -1;
        for (int i = 1; i <= 10000; i++) {
            if ((int)(i * 0.08) == a && 
                (int)(i * 0.10) == b) {
                    ans = i;
                    break;
                }
        }
        
        
       System.out.println(ans);
    }
}