import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    }
} Main public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    } main {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    } 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 int n = 1; n 1 while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        } n < 2000 n 2000 {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        } if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            } n / 10 == b && (int)(n * 0.08) == a n / 10 == b n / 10 n 10 b (int)(n * 0.08) == a (int)(n * 0.08) n 0.08 a {
                System.out.println(n);
                return;
            } System.out.println(n) System.out.println System.out System System.out n return; n++ n 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) {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    }
} public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int n = 1;
        while (n < 2000) {
            if (n / 10 == b && (int)(n * 0.08) == a) {
                System.out.println(n);
                return;
            }
            n++;
        }
        System.out.println(-1);
    }
}
