import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            System.out.println(-1);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            System.out.println(-1);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            System.out.println(-1);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            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 boolean f = false; f false for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        } {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        } int at = (int) (i * 0.08); at (int) (i * 0.08) i 0.08 int bt = (int) (i * 0.1); bt (int) (i * 0.1) i 0.1 if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            } at == a && bt == b at == a at a bt == b bt b {
                System.out.println(i);
                f = true;
                break;
            } System.out.println(i) System.out.println System.out System System.out i f = true f true break; if (!f) {
            System.out.println(-1);
        } !f f {
            System.out.println(-1);
        } 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 sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            System.out.println(-1);
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            System.out.println(-1);
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        boolean f = false;
        for (int i = 1; i <= 1000; i++) {
            int at = (int) (i * 0.08);
            int bt = (int) (i * 0.1);
            if (at == a && bt == b) {
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f) {
            System.out.println(-1);
        }
    }
}