import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	}

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	} int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		} int p = 1; int p = 1; p 1 p <= 1000 p 1000 ++p ++p p {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		} {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		} int tax8 = p * 8 / 100; tax8 p * 8 / 100 p * 8 p 8 100 if (tax8 != a) {
				continue;
			} tax8 != a tax8 a {
				continue;
			} continue; int tax10 = p * 10 / 100; tax10 p * 10 / 100 p * 10 p 10 100 if (tax10 != b) {
				continue;
			} tax10 != b tax10 b {
				continue;
			} continue; System.out.println(p) System.out.println System.out System System.out p return; System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	}

} public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	}

} Main
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());

		for (int p = 1; p <= 1000; ++p) {
			int tax8 = p * 8 / 100;
			if (tax8 != a) {
				continue;
			}

			int tax10 = p * 10 / 100;
			if (tax10 != b) {
				continue;
			}

			System.out.println(p);
			return;
		}

		System.out.println(-1);
	}

}
