import java.util.Scanner;

public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(ans);
    }
} import java.util.Scanner; Scanner 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();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(ans);
    }
} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(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 sc.close() sc.close sc int ans = -1; ans -1 1 int ax ax bx; bx for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        } {
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        } ax = (int) (i * 0.08) ax (int) (i * 0.08) i 0.08 bx = (int) (i * 0.1) bx (int) (i * 0.1) i 0.1 if(ax == A && bx == B){
                ans = i;
                break;
            } ax == A && bx == B ax == A ax A bx == B bx B {
                ans = i;
                break;
            } ans = i ans i break; System.out.print(ans) System.out.print System.out System System.out ans 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();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(ans);
    }
} public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        sc.close();
        int ans = -1;
        int ax, bx;
        for(int i = 1; i <= 1000; i++){
            ax = (int) (i * 0.08);
            bx = (int) (i * 0.1);
            if(ax == A && bx == B){
                ans = i;
                break;
            }
        }
        System.out.print(ans);
    }
}
