import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    } 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 int tax8pricemin = (int)(((double)a) / 0.08); tax8pricemin (int)(((double)a) / 0.08) ((double)a) 0.08 int tax8pricemax = (int)(((double)a + 1) / 0.08); tax8pricemax (int)(((double)a + 1) / 0.08) ((double)a + 1) (double)a 1 0.08 for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        } int i = tax8pricemin ; int i = tax8pricemin ; i tax8pricemin i < tax8pricemax i tax8pricemax i++ i++ i {
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        } {
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        } int tax8 = (int)(i * 0.08); tax8 (int)(i * 0.08) i 0.08 int tax10 = (int)(i * 0.1); tax10 (int)(i * 0.1) i 0.1 if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            } tax8 == a && tax10 == b tax8 == a tax8 a tax10 == b tax10 b {
                System.out.println(i);
                System.exit(0);
            } System.out.println(i) System.out.println System.out System System.out i System.exit(0) System.exit System 0 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 scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int tax8pricemin = (int)(((double)a) / 0.08);
        int tax8pricemax = (int)(((double)a + 1) / 0.08);

        for(int i = tax8pricemin ; i < tax8pricemax; i++){
            int tax8 = (int)(i * 0.08);
            int tax10 = (int)(i * 0.1);

            if(tax8 == a && tax10 == b){
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
}