import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int result = (int) Math.ceil(a / 0.08); result (int) Math.ceil(a / 0.08) Math.ceil Math a / 0.08 a 0.08 if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        } (int) (result * 0.1) != b (int) (result * 0.1) result 0.1 b {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        } if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            } (int) (b * 10 * 0.08) == a (int) (b * 10 * 0.08) b * 10 * 0.08 b 10 0.08 a {
                result = b * 10;
            } result = b * 10 result b * 10 b 10 {
                result = -1;
            } result = -1 result -1 1 System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        // 主処理
        int result = (int) Math.ceil(a / 0.08);
        if ((int) (result * 0.1) != b) {
            if ((int) (b * 10 * 0.08) == a) {
                result = b * 10;
            } else {
                result = -1;
            }
        }

        // 出力
        System.out.println(result);
        sc.close();
    }
}
