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();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		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();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		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 boolean bool = true; bool true if (bool) {
			System.out.println("-1");
		} bool {
			System.out.println("-1");
		} System.out.println("-1") System.out.println System.out System System.out "-1" 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();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		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();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		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();

		boolean bool = true;
		loop: for (int i = 1; i <= 1010; i++) {
			int k1 = (int) (i * 0.08);
			int k2 = (int) (i * 0.1);

			if (k1 == a && k2 == b) {
				bool = false;
				System.out.println(i);
				break loop;
			}
		}

		if (bool) {
			System.out.println("-1");
		}

		sc.close();
	}
}