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();
        int res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} 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();
        int res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    } 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 res = -1; res -1 1 for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        } {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        } int a = (int)Math.floor(i*0.08); a (int)Math.floor(i*0.08) Math.floor Math i*0.08 i 0.08 int b = (int)Math.floor(i*0.1); b (int)Math.floor(i*0.1) Math.floor Math i*0.1 i 0.1 if(a==A && b==B) {
                res = i;
                break;
            } a==A && b==B a==A a A b==B b B {
                res = i;
                break;
            } res = i res i break; System.out.println(res) System.out.println System.out System System.out res 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 res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
} 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();
        int res = -1;
        for(int i = 1; i <= 1000; i++) {
            int a = (int)Math.floor(i*0.08);
            int b = (int)Math.floor(i*0.1);
            if(a==A && b==B) {
                res = i;
                break;
            }
        }
        System.out.println(res);
    }
}
