import java.util.Scanner;

public class Main {
    static long n;
    static long a;
    static long b;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static long n;
    static long a;
    static long b;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} Main static long n; n static long a; a static long b; b public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = sc.nextLong() a sc.nextLong() sc.nextLong sc b = sc.nextLong() b sc.nextLong() sc.nextLong sc int ans = -1; ans -1 1 for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        } int i = 0; int i = 0; i 0 i < 10000 i 10000 i++ i++ i {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        } {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        } if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            } i*8/100 == a && i*10/100 == b i*8/100 == a i*8/100 i*8 i 8 100 a i*10/100 == b i*10/100 i*10 i 10 100 b {
                ans = i;
                break;
            } ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    static long n;
    static long a;
    static long b;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} public class Main {
    static long n;
    static long a;
    static long b;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    static long n;
    static long a;
    static long b;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a = sc.nextLong();
        b = sc.nextLong();
        int ans = -1;
        for (int i = 0; i < 10000; i++) {
            if (i*8/100 == a && i*10/100 == b) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
}