import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] S = sc.nextLine().split(" "); S sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " long A = Long.parseLong(S[0]); A Long.parseLong(S[0]) Long.parseLong Long S[0] S 0 long B = Long.parseLong(S[1]); B Long.parseLong(S[1]) Long.parseLong Long S[1] S 1 sc.close() sc.close sc long temp = 0; temp 0 for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        } int i = 1; int i = 1; i 1 i <= 1262 i 1262 i++ i++ i {
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        } {
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        } long a = (long) (i * 0.08); a (long) (i * 0.08) i 0.08 if(a != A){
                continue;
            } a != A a A {
                continue;
            } continue; long b = (long) (i * 0.1); b (long) (i * 0.1) i 0.1 if(b == B){
                temp = i;
                break;
            } b == B b B {
                temp = i;
                break;
            } temp = i temp i break; if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        } temp == 0 temp 0 {
            System.out.println("-1");
        } System.out.println("-1") System.out.println System.out System System.out "-1" {
            System.out.println(temp);
        } System.out.println(temp) System.out.println System.out System System.out temp String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split(" ");
        long A = Long.parseLong(S[0]);
        long B = Long.parseLong(S[1]);
        sc.close();

        long temp = 0;
        for(int i = 1; i <= 1262; i++){
            long a = (long) (i * 0.08);
            if(a != A){
                continue;
            }
            long b = (long) (i * 0.1);
            if(b == B){
                temp = i;
                break;
            }
        }

        if(temp == 0){
            System.out.println("-1");
        }else{
            System.out.println(temp);
        }
    }

}
