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();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        }
    }
} 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();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                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 = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        } int i = 0; int i = 0; i 0 i < Integer.MAX_VALUE i Integer.MAX_VALUE Integer Integer.MAX_VALUE i++ i++ i {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        } {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        } int tax8 = (int) (i * 0.08); tax8 (int) (i * 0.08) i 0.08 int tax10 = (int) (i * 0.1); tax10 (int) (i * 0.1) i 0.1 if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            } a == tax8 && b == tax10 a == tax8 a tax8 b == tax10 b tax10 {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            } a < tax8 || b < tax10 a < tax8 a tax8 b < tax10 b tax10 {
                System.out.println("-1");
                return;
            } System.out.println("-1") System.out.println System.out System System.out "-1" return; 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();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        }
    }
} 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();

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int tax8 = (int) (i * 0.08);
            int tax10 = (int) (i * 0.1);
            if (a == tax8 && b == tax10) {
                System.out.println(i);
                return;
            }
            if (a < tax8 || b < tax10) {
                System.out.println("-1");
                return;
            }
        }
    }
}
