import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = -1;
		for (int i = 1; i <= 1009; i++) {
			if (Math.floor(i * 0.08) == a && Math.floor(i * 0.1) == b) {
				ans = i;
				break;
			}
		}

		System.out.println((int) ans);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = -1;
		for (int i = 1; i <= 1009; i++) {
			if (Math.floor(i * 0.08) == a && Math.floor(i * 0.1) == b) {
				ans = i;
				break;
			}
		}

		System.out.println((int) ans);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = -1;
		for (int i = 1; i <= 1009; i++) {
			if (Math.floor(i * 0.08) == a && Math.floor(i * 0.1) == b) {
				ans = i;
				break;
			}
		}

		System.out.println((int) ans);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = -1;
		for (int i = 1; i <= 1009; i++) {
			if (Math.floor(i * 0.08) == a && Math.floor(i * 0.1) == b) {
				ans = i;
				break;
			}
		}

		System.out.println((int) ans);

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

		System.out.println((int) ans);

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = -1;
		for (int i = 1; i <= 1009; i++) {
			if (Math.floor(i * 0.08) == a && Math.floor(i * 0.1) == b) {
				ans = i;
				break;
			}
		}

		System.out.println((int) ans);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = -1;
		for (int i = 1; i <= 1009; i++) {
			if (Math.floor(i * 0.08) == a && Math.floor(i * 0.1) == b) {
				ans = i;
				break;
			}
		}

		System.out.println((int) ans);

		sc.close();
	}
}