import java.util.*;

class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        Main m = new Main();
        m.run();
    }

    private void run() {
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < 1250; i++) {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
} import java.util.*; util.* java class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        Main m = new Main();
        m.run();
    }

    private void run() {
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < 1250; i++) {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        Main m = new Main();
        m.run();
    } main {
        Main m = new Main();
        m.run();
    } Main m = new Main(); m new Main() m.run() m.run m String[] args args private void run() {
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < 1250; i++) {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    } run {
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < 1250; i++) {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc for (int i = 0; i < 1250; i++) {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        } int i = 0; int i = 0; i 0 i < 1250 i 1250 i++ i++ i {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        } {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        } int p1 = (int) Math.floor(i * 0.08); p1 (int) Math.floor(i * 0.08) Math.floor Math i * 0.08 i 0.08 int p2 = (int) Math.floor(i * 0.1); p2 (int) Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            } p1 == a && p2 == b p1 == a p1 a p2 == b p2 b {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; System.out.println(-1) System.out.println System.out System System.out -1 1
import java.util.*;

class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        Main m = new Main();
        m.run();
    }

    private void run() {
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < 1250; i++) {
            int p1 = (int) Math.floor(i * 0.08);
            int p2 = (int) Math.floor(i * 0.1);
            if (p1 == a && p2 == b) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
}
