import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		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, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		System.out.println(-1);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		System.out.println(-1);
	} main {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		System.out.println(-1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A A B; B A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc sc.close() sc.close sc for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		} int b = 1; int b = 1; b 1 b < 9999999 b 9999999 b++ b++ b {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		} {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		} if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			} Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B Math.floor(b * 0.08) == A Math.floor(b * 0.08) Math.floor Math b * 0.08 b 0.08 A Math.floor(b * 0.1) == B Math.floor(b * 0.1) Math.floor Math b * 0.1 b 0.1 B {
				System.out.println(b);
				return;
			} System.out.println(b) System.out.println System.out System System.out b return; 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, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		System.out.println(-1);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		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, B;
		A = sc.nextInt();
		B = sc.nextInt();
		sc.close();

		for (int b = 1; b < 9999999; b++) {
			if (Math.floor(b * 0.08) == A && Math.floor(b * 0.1) == B) {
				System.out.println(b);
				return;
			}
		}
		System.out.println(-1);
	}
}
