import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc boolean found = false; found false int i; i for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		} i = 1; i = 1 i 1 i <= 1000 i 1000 i++ i++ i {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		} {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		} if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			} (int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b (int) Math.floor(i * 0.08) == a (int) Math.floor(i * 0.08) Math.floor Math i * 0.08 i 0.08 a (int) Math.floor(i * 0.1) == b (int) Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 b {
				found = true;
				break;
			} found = true found true break; if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		} found {
			System.out.println(i);
		} System.out.println(i) System.out.println System.out System System.out i {
			System.out.println(-1);
		} 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 = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		boolean found = false;
		int i;
		for (i = 1; i <= 1000; i++) {
			if ((int) Math.floor(i * 0.08) == a && (int) Math.floor(i * 0.1) == b) {
				found = true;
				break;
			}
		}
		if (found) {
			System.out.println(i);
		} else {
			System.out.println(-1);
		}
	}
}