import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int x = 1; x 1 while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        } x <= 1009 x 1009 {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        } if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            } (x * 8 / 100 == a) && (x * 10 / 100 == b) (x * 8 / 100 == a) x * 8 / 100 x * 8 x 8 100 a (x * 10 / 100 == b) x * 10 / 100 x * 10 x 10 100 b {
                System.out.println(x);
                return;
            } System.out.println(x) System.out.println System.out System System.out x return; x++ x System.out.println("-1") System.out.println System.out System System.out "-1" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int x = 1;
        while (x <= 1009) {
            if ((x * 8 / 100 == a) && (x * 10 / 100 == b)) {
                System.out.println(x);
                return;
            }
            x++;
        }
        System.out.println("-1");
    }
}