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();
		sc.close();

		int max = (int) (100d / 0.08d);

		for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} 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();
		sc.close();

		int max = (int) (100d / 0.08d);

		for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		int max = (int) (100d / 0.08d);

		for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		int max = (int) (100d / 0.08d);

		for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	} 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 sc.close() sc.close sc int max = (int) (100d / 0.08d); max (int) (100d / 0.08d) 100d 0.08d for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		} int i = 1; int i = 1; i 1 i <= max i max i++ i++ i {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		} {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		} int xa = (int) (i * 0.08D); xa (int) (i * 0.08D) i 0.08D int xb = (int) (i * 0.1D); xb (int) (i * 0.1D) i 0.1D if (a == xa && b == xb) {
				System.out.println(i);
				return;
			} a == xa && b == xb a == xa a xa b == xb b xb {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i 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 sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		int max = (int) (100d / 0.08d);

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

		int max = (int) (100d / 0.08d);

		for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
} 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();
		sc.close();

		int max = (int) (100d / 0.08d);

		for (int i = 1; i <= max; i++) {
			int xa = (int) (i * 0.08D);
			int xb = (int) (i * 0.1D);
			if (a == xa && b == xb) {
				System.out.println(i);
				return;
			}
		}
		System.out.println(-1);
	}
}
