import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	}

	static class C {
		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		}

	}
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	}

	static class C {
		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		}

	}
} Main public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	} main {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	} InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) C solver = new C(); solver new C() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class C {
		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		}

	} C public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		} solve {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		} int a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt(); b in.nextInt() in.nextInt in int result = -1; result -1 1 for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			} int x = 0; int x = 0; x 0 ((int) (x * 0.08)) <= a ((int) (x * 0.08)) x 0.08 a x++ x++ x {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			} {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			} if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				} ((int) (x * 0.08) == a) && ((int) (x * 0.1) == b) ((int) (x * 0.08) == a) (int) (x * 0.08) x 0.08 a ((int) (x * 0.1) == b) (int) (x * 0.1) x 0.1 b {
					result = x;
					break;
				} result = x result x break; out.println(result) out.println out result int testNumber testNumber Scanner in in PrintWriter out out public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	}

	static class C {
		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		}

	}
} public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	}

	static class C {
		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		}

	}
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		C solver = new C();
		solver.solve(1, in, out);
		out.close();
	}

	static class C {
		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int a = in.nextInt(), b = in.nextInt();

			int result = -1;
			for (int x = 0; ((int) (x * 0.08)) <= a; x++) {
				if (((int) (x * 0.08) == a) && ((int) (x * 0.1) == b)) {
					result = x;
					break;
				}
			}
			out.println(result);
		}

	}
}

