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 base = b * 10;

        int ans = -1;
        for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} 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 base = b * 10;

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

        int ans = -1;
        for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int base = b * 10;

        int ans = -1;
        for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    } 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 base = b * 10; base b * 10 b 10 int ans = -1; ans -1 1 for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        } int i = base; int i = base; i base i < base + 10 i base + 10 base 10 i++ i++ i {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        } {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        } int cal = i * 8 / 100; cal i * 8 / 100 i * 8 i 8 100 if (cal == a) {
                ans = i;
                break;
            } cal == a cal a {
                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 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int base = b * 10;

        int ans = -1;
        for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int base = b * 10;

        int ans = -1;
        for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
} 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 base = b * 10;

        int ans = -1;
        for (int i = base; i < base + 10; i++) {
            int cal = i * 8 / 100;
            if (cal == a) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
    }
}