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 price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    }
} 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 price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    } main {
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    } 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 price; price double stop; stop int answer = -1; answer -1 1 if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        } A > B A B {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } price = A * 10 price A * 10 A 10 stop = (A+1) / 8.0 * 100.0 stop (A+1) / 8.0 * 100.0 (A+1) / 8.0 (A+1) A 1 8.0 100.0 {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        } price = B * 10 price B * 10 B 10 stop = (B + 1) / 10.0 * 100.0 stop (B + 1) / 10.0 * 100.0 (B + 1) / 10.0 (B + 1) B 1 10.0 100.0 while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        } price < stop price stop {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        } double first = price * 0.08; first price * 0.08 price 0.08 double second = price * 0.1; second price * 0.1 price 0.1 if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            } (int) first == A && (int) second == B (int) first == A (int) first A (int) second == B (int) second B {
                answer = price;
                break;
            } answer = price answer price break; price++ price System.out.println(answer) System.out.println System.out System System.out answer 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 price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    }
} 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 price;
        double stop;
        int answer = -1;
        if (A > B) {
            price = A * 10;
            stop = (A+1) / 8.0 * 100.0;
        } else {
            price = B * 10;
            stop = (B + 1) / 10.0 * 100.0;
        }
        while (price < stop) {
            double first = price * 0.08;
            double second = price * 0.1;
            if ((int) first == A && (int) second == B) {
                answer = price;
                break;
            }
            price++;
        }
        System.out.println(answer);
    }
}
