import java.util.*;
import java.lang.*;

public class Main {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    }
} Main public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    } main {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        } int p = 1; int p = 1; p 1 p < 2000 p 2000 p++ p++ p {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        } {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        } if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            } (int) (p * .08) == a && (int) (p * .1) == b (int) (p * .08) == a (int) (p * .08) p .08 a (int) (p * .1) == b (int) (p * .1) p .1 b {
                System.out.println(p);
                return;
            } System.out.println(p) System.out.println System.out System System.out p return; System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    }
} public class Main {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    }
} Main
import java.util.*;
import java.lang.*;

public class Main {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();

        for (int p = 1; p < 2000; p++) {
            if ((int) (p * .08) == a && (int) (p * .1) == b) {
                System.out.println(p);
                return;
            }
        }
        System.out.println(-1);
    }
}