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();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	}

} 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();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	} main {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	} 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 for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		} int x = 10 * b; int x = 10 * b; x 10 * b 10 b x < 10 * (b + 1) x 10 * (b + 1) 10 (b + 1) b 1 x++ x++ x {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		} {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		} if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			} x * 8 / 100 == a x * 8 / 100 x * 8 x 8 100 a {
				System.out.println(x);
				return;
			} System.out.println(x) System.out.println System.out System System.out x 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 scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	}

} 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();
		for (int x = 10 * b; x < 10 * (b + 1); x++) {
			if (x * 8 / 100 == a) {
				System.out.println(x);
				return;
			}
		}
		System.out.println(-1);
	}

}
