import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[] = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		} int i = 1; int i = 1; i 1 i <= 10000 i 10000 i++ i++ i {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		} {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		} double e = (double) (i * 0.08); e (double) (i * 0.08) i 0.08 double t = (double) (i * 0.1); t (double) (i * 0.1) i 0.1 e = Math.floor(e) e Math.floor(e) Math.floor Math e t = Math.floor(t) t Math.floor(t) Math.floor Math t if (e == a && b == t) {
				System.out.println(i);
				return;
			} e == a && b == t e == a e a b == t b t {
				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" String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split(" ");

		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);

		for (int i = 1; i <= 10000; i++) {
			double e = (double) (i * 0.08);
			double t = (double) (i * 0.1);

			e = Math.floor(e);
			t = Math.floor(t);

			if (e == a && b == t) {
				System.out.println(i);
				return;
			}
		}
		System.out.println("-1");
	}
}