import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    }
} import java.util.*; util.* java public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    } main {
        Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int A = stdIn.nextInt(); A stdIn.nextInt() stdIn.nextInt stdIn int B = stdIn.nextInt(); B stdIn.nextInt() stdIn.nextInt stdIn stdIn.close() stdIn.close stdIn int result = 0; result 0 for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        } int i = 13; int i = 13; i 13 i <= 1000 i 1000 i++ i++ i {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        } {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        } if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            } ((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B) ((int)Math.floor(i * 0.08) == A) (int)Math.floor(i * 0.08) Math.floor Math i * 0.08 i 0.08 A ((int)Math.floor(i * 0.1) == B) (int)Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 B {
                System.out.println(i);
                result = 1;
                break;
            } System.out.println(i) System.out.println System.out System System.out i result = 1 result 1 break; if (result == 0) {
            System.out.println(-1);
        } result == 0 result 0 {
            System.out.println(-1);
        } 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 stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    }
} public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    }
} Main
import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int A = stdIn.nextInt();
        int B = stdIn.nextInt();
        stdIn.close();

        int result = 0;
        for (int i = 13; i <= 1000; i++) {
            if (((int)Math.floor(i * 0.08) == A) && ((int)Math.floor(i * 0.1) == B)) {
                System.out.println(i);
                result = 1;
                break;
            }
        }   
        if (result == 0) {
            System.out.println(-1);
        }
    }
}