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 ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    }

} 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 ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    } 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 < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        } int i = 1; int i = 1; i 1 i < 15000 i 15000 i++ i++ i {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        } {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        } int x = (int)(i * 0.08); x (int)(i * 0.08) i 0.08 int y = (int)(i * 0.10); y (int)(i * 0.10) i 0.10 if(x == a && y == b){
                ans = i;
                break;
            } x == a && y == b x == a x a y == b y b {
                ans = i;
                break;
            } ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc 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 ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    }

} 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 ans = -1;
        for (int i = 1; i < 15000; i++) {
            int x = (int)(i * 0.08);
            int y = (int)(i * 0.10);
            if(x == a && y == b){
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        sc.close();

    }

}
