import java.util.Scanner;

/**
 * Tax Increase
 * 
 * https://atcoder.jp/contests/abc158/tasks/abc158_c
 */
public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) throws Exception {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) throws Exception {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    }

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws Exception {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    } main {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    } int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int a = (int) Math.ceil(A / 0.08); a (int) Math.ceil(A / 0.08) Math.ceil Math A / 0.08 A 0.08 int b = (int) Math.ceil(B / 0.1); b (int) Math.ceil(B / 0.1) Math.ceil Math B / 0.1 B 0.1 int c = Math.max(a, b); c Math.max(a, b) Math.max Math a b if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        } Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B Math.floor(c * 0.08) == A Math.floor(c * 0.08) Math.floor Math c * 0.08 c 0.08 A Math.floor(c * 0.1) == B Math.floor(c * 0.1) Math.floor Math c * 0.1 c 0.1 B {
            System.out.println(c);
        } System.out.println(c) System.out.println System.out System System.out c {
            System.out.println(-1);
        } System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) throws Exception {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    }

} public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) throws Exception {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    }

} Main
import java.util.Scanner;

/**
 * Tax Increase
 * 
 * https://atcoder.jp/contests/abc158/tasks/abc158_c
 */
public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) throws Exception {
        int A = sc.nextInt();
        int B = sc.nextInt();

        int a = (int) Math.ceil(A / 0.08);
        int b = (int) Math.ceil(B / 0.1);

        int c = Math.max(a, b);

        if (Math.floor(c * 0.08) == A && Math.floor(c * 0.1) == B) {
            System.out.println(c);
        } else {
            System.out.println(-1);
        }
    }

}
