import java.util.Scanner;
import java.lang.Math;

class Main{

    public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int sum = 0;
        double tax1 = 0.08;
        double tax2 = 0.1;
        while(true){
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        }

    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang class Main{

    public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int sum = 0;
        double tax1 = 0.08;
        double tax2 = 0.1;
        while(true){
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        }

    }
} Main public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int sum = 0;
        double tax1 = 0.08;
        double tax2 = 0.1;
        while(true){
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        }

    } main {

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int sum = 0;
        double tax1 = 0.08;
        double tax2 = 0.1;
        while(true){
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        }

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int sum = 0; sum 0 double tax1 = 0.08; tax1 0.08 double tax2 = 0.1; tax2 0.1 while(true){
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        } true {
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        } sum += 1 sum 1 if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            } Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b Math.floor(sum*tax1)==a Math.floor(sum*tax1) Math.floor Math sum*tax1 sum tax1 a Math.floor(sum*tax2)==b Math.floor(sum*tax2) Math.floor Math sum*tax2 sum tax2 b {
                System.out.println(sum);
                return;
            } System.out.println(sum) System.out.println System.out System System.out sum return; if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            } sum>a/tax1 && sum>b/tax2 sum>a/tax1 sum a/tax1 a tax1 sum>b/tax2 sum b/tax2 b tax2 {
                System.out.println("-1");
                return;
            } System.out.println("-1") System.out.println System.out System System.out "-1" return; String[] args args
import java.util.Scanner;
import java.lang.Math;

class Main{

    public static void main(String[] args){

        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int sum = 0;
        double tax1 = 0.08;
        double tax2 = 0.1;
        while(true){
            sum += 1;
            if(Math.floor(sum*tax1)==a && Math.floor(sum*tax2)==b){
                System.out.println(sum);
                return;
            }
            if(sum>a/tax1 && sum>b/tax2){
                System.out.println("-1");
                return;
            }
        }

    }
}