import java.util.Scanner;

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

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	} main {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner double x8 = (double)A * (100.0 / 8.0); x8 (double)A * (100.0 / 8.0) (double)A (100.0 / 8.0) 100.0 8.0 double x10 = (double)B * 10.0; x10 (double)B * 10.0 (double)B 10.0 int floor8 = (int)(Math.floor(x8)); floor8 (int)(Math.floor(x8)) Math.floor Math x8 int floor10 = (int)(Math.floor(x10)); floor10 (int)(Math.floor(x10)) Math.floor Math x10 int num = 0; num 0 for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		} int i = (int)Math.ceil(x8); int i = (int)Math.ceil(x8); i (int)Math.ceil(x8) Math.ceil Math x8 true i++ i++ i {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		} {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		} int floorZei8 = (int)(Math.floor((double)i * 0.08)); floorZei8 (int)(Math.floor((double)i * 0.08)) Math.floor Math (double)i * 0.08 (double)i 0.08 int floorZei10 = (int)(Math.floor((double)i * 0.1)); floorZei10 (int)(Math.floor((double)i * 0.1)) Math.floor Math (double)i * 0.1 (double)i 0.1 if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			} floorZei8 == A && floorZei10 == B floorZei8 == A floorZei8 A floorZei10 == B floorZei10 B {
				num = i;
				break;
			} num = i num i break; {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			} if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				} floorZei8 != A && floorZei10 != B floorZei8 != A floorZei8 A floorZei10 != B floorZei10 B {
					num = -1;
					break;
				} num = -1 num -1 1 break; {
					continue;
				} continue; System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	}
} Main
import java.util.Scanner;

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

		double x8 = (double)A * (100.0 / 8.0);
		double x10 = (double)B * 10.0;

		int floor8 = (int)(Math.floor(x8));
		int floor10 = (int)(Math.floor(x10));

		int num = 0;
		for (int i = (int)Math.ceil(x8); true; i++) {
			int floorZei8 = (int)(Math.floor((double)i * 0.08));
			int floorZei10 = (int)(Math.floor((double)i * 0.1));

			if (floorZei8 == A && floorZei10 == B) {
				num = i;
				break;
			}
			else {
				if (floorZei8 != A && floorZei10 != B) {
					num = -1;
					break;
				}
				else {
					continue;
				}
			}
		}

		System.out.println(num);
	}
}