import java.util.*;

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

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();

        for (int i = 1; i <= 10000; i++) {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }

        System.out.println(-1);
        return;
    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();

        for (int i = 1; i <= 10000; i++) {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }

        System.out.println(-1);
        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();

        for (int i = 1; i <= 10000; i++) {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }

        System.out.println(-1);
        return;
    } run {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();

        for (int i = 1; i <= 10000; i++) {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }

        System.out.println(-1);
        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc for (int i = 1; i <= 10000; i++) {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        } int i = 1; int i = 1; i 1 i <= 10000 i 10000 i++ i++ i {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        } {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        } if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            } (i / 10) == B && (i * 8 / 100) == A (i / 10) == B (i / 10) i 10 B (i * 8 / 100) == A (i * 8 / 100) i * 8 i 8 100 A {
                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 return;
import java.util.*;

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

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();

        for (int i = 1; i <= 10000; i++) {
            if ((i / 10) == B && (i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }

        System.out.println(-1);
        return;
    }

}