import java.util.*;
import java.math.*;
public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	}
}  import java.util.*; util.* java import java.math.*; math.* java public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	}
} Main static int r; r static int c; c public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	} main {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in boolean[] ans = new boolean[1001]; ans new boolean[1001] 1001 for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		} int i = 1; int i = 1; i 1 i < 1001 i 1001 i++ i++ i {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		} {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		} int eight = (int)(i * 0.08); eight (int)(i * 0.08) i 0.08 int ten = (int) (i * 0.1); ten (int) (i * 0.1) i 0.1 ans[i] = ((eight == a) && (ten == b)) ans[i] ans i ((eight == a) && (ten == b)) (eight == a) eight a (ten == b) ten b String res = "-1"; res "-1" for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		} int i = 1; int i = 1; i 1 i < 1001 i 1001 i++ i++ i {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		} {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		} if(ans[i] == true) {
				res = i + "";
				break;
			} ans[i] == true ans[i] ans i true {
				res = i + "";
				break;
			} res = i + "" res i + "" i "" break; System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	}
} public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	}
} Main
import java.util.*;
import java.math.*;
public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt();
		boolean[] ans = new boolean[1001];
		for(int i = 1; i < 1001; i++) {
			int eight = (int)(i * 0.08);
			int ten = (int) (i * 0.1);
			ans[i] = ((eight == a) && (ten == b));
		}
		String res = "-1";
		for(int i = 1; i < 1001; i++) {
			if(ans[i] == true) {
				res = i + "";
				break;
			}
		}
		System.out.println(res);
	}
} 
