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();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    }
} 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();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    } 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 x1; x1 if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        } a % 2 == 0 a % 2 a 2 0 {
            x1 = a * 25 / 2;
        } x1 = a * 25 / 2 x1 a * 25 / 2 a * 25 a 25 2 {
            x1 = a * 25 / 2 + 1;
        } x1 = a * 25 / 2 + 1 x1 a * 25 / 2 + 1 a * 25 / 2 a * 25 a 25 2 1 int x2 = b * 10; x2 b * 10 b 10 int result = -1; result -1 1 for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        } int i = Math.min(x1, x2); int i = Math.min(x1, x2); i Math.min(x1, x2) Math.min Math x1 x2 i <= Math.max(x1, x2) i Math.max(x1, x2) Math.max Math x1 x2 i++ i++ i {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        } {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        } if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            } i * 2 / 25 == a && i / 10 == b i * 2 / 25 == a i * 2 / 25 i * 2 i 2 25 a i / 10 == b i / 10 i 10 b {
                result = i;
                break;
            } result = i result i break; System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc 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();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    }
} 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();
        int x1;
        if (a % 2 == 0) {
            x1 = a * 25 / 2;
        } else {
            x1 = a * 25 / 2 + 1;
        }
        int x2 = b * 10;
        int result = -1;
        for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++) {
            if (i * 2 / 25 == a && i / 10 == b) {
                result = i;
                break;
            }
        }
        System.out.println(result);
        sc.close();
    }
}