import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}

} Main public static void main(String[] args) {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	} main {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	} int A; A int B; B int i; i Scanner sc = new Scanner(System.in); sc new Scanner(System.in) A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc sc.close() sc.close sc for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		} i = 0; i = 0 i 0 i < 10001 i 10001 i++ i++ i {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		} {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		} if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			} (int) (i * 0.08) == A && (int) (i * 0.1) == B (int) (i * 0.08) == A (int) (i * 0.08) i 0.08 A (int) (i * 0.1) == B (int) (i * 0.1) i 0.1 B {
				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" String[] args args public class Main {

	public static void main(String[] args) {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}

} public class Main {

	public static void main(String[] args) {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int A;
		int B;
		int i;
		Scanner sc = new Scanner(System.in);
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();
		for (i = 0; i < 10001; i++) {
			if ((int) (i * 0.08) == A && (int) (i * 0.1) == B) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}

}