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();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -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();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -1);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -1);
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -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 double a2 = (double) a / 0.08; a2 (double) a / 0.08 (double) a 0.08 double b2 = (double) b / 0.1; b2 (double) b / 0.1 (double) b 0.1 double result = Math.ceil(Math.max(a2, b2)); result Math.ceil(Math.max(a2, b2)) Math.ceil Math Math.max(a2, b2) Math.max Math a2 b2 boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b; isMatch Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b Math.floor(result * 0.08) == a Math.floor(result * 0.08) Math.floor Math result * 0.08 result 0.08 a Math.floor(result * 0.1) == b Math.floor(result * 0.1) Math.floor Math result * 0.1 result 0.1 b System.out.println(isMatch ? (int) result : -1) System.out.println System.out System System.out isMatch ? (int) result : -1 isMatch (int) result -1 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();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -1);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -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();

        double a2 = (double) a / 0.08;
        double b2 = (double) b / 0.1;

        double result = Math.ceil(Math.max(a2, b2));
        boolean isMatch = Math.floor(result * 0.08) == a && Math.floor(result * 0.1) == b;

        System.out.println(isMatch ? (int) result : -1);
    }
}