import java.io.*;
import java.util.*;

public class Main extends PrintWriter {
	Main() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		Main o = new Main(); o.main(); o.flush();
	}

	void main() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main extends PrintWriter {
	Main() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		Main o = new Main(); o.main(); o.flush();
	}

	void main() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main() { super(System.out, true); } Main { super(System.out, true); } super(System.out, true) super System.out System System.out true public static void main(String[] $) {
		Main o = new Main(); o.main(); o.flush();
	} main {
		Main o = new Main(); o.main(); o.flush();
	} Main o = new Main(); o new Main() o.main() o.main o o.flush() o.flush o String[] $ $ void main() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	} main {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			} int p = b * 10; int p = b * 10; p b * 10 b 10 p < (b + 1) * 10 p (b + 1) * 10 (b + 1) b 1 10 p++ p++ p if (p * 8 / 100 == a) {
				println(p);
				return;
			} if (p * 8 / 100 == a) {
				println(p);
				return;
			} p * 8 / 100 == a p * 8 / 100 p * 8 p 8 100 a {
				println(p);
				return;
			} println(p) println p return; println(-1) println -1 1 PrintWriter public class Main extends PrintWriter {
	Main() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		Main o = new Main(); o.main(); o.flush();
	}

	void main() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	}
} public class Main extends PrintWriter {
	Main() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		Main o = new Main(); o.main(); o.flush();
	}

	void main() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	}
} Main
import java.io.*;
import java.util.*;

public class Main extends PrintWriter {
	Main() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		Main o = new Main(); o.main(); o.flush();
	}

	void main() {
		int a = sc.nextInt();
		int b = sc.nextInt();
		for (int p = b * 10; p < (b + 1) * 10; p++)
			if (p * 8 / 100 == a) {
				println(p);
				return;
			}
		println(-1);
	}
}
