import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTaxIncrease {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTaxIncrease {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) CTaxIncrease solver = new CTaxIncrease(); solver new CTaxIncrease() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class CTaxIncrease {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        }

    } CTaxIncrease public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        } solve {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        } int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in int i = 1; i 1 while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            } i < 10000 i 10000 {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            } int e = (int) ((double) i * 0.08); e (int) ((double) i * 0.08) (double) i 0.08 int t = (int) ((double) i * 0.1); t (int) ((double) i * 0.1) (double) i 0.1 if (e == a && t == b) break; e == a && t == b e == a e a t == b t b break; i++ i out.println(i == 10000 ? -1 : i) out.println out i == 10000 ? -1 : i i == 10000 i 10000 -1 1 i int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTaxIncrease {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTaxIncrease {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTaxIncrease solver = new CTaxIncrease();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTaxIncrease {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int a = in.nextInt();
            int b = in.nextInt();
            int i = 1;
            while (i < 10000) {
                int e = (int) ((double) i * 0.08);
                int t = (int) ((double) i * 0.1);
                if (e == a && t == b) break;
                i++;
            }

            out.println(i == 10000 ? -1 : i);

        }

    }
}

