import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc boolean notFound = true; notFound true for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		} int i = 10; int i = 10; i 10 i < 1010 i 1010 i++ i++ i {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		} {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		} if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			} Math.floor(i * 0.08) == A Math.floor(i * 0.08) Math.floor Math i * 0.08 i 0.08 A {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			} if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				} Math.floor(i * 0.1) == B Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 B {
					System.out.println(i);
					notFound = false;
					break;
				} System.out.println(i) System.out.println System.out System System.out i notFound = false notFound false break; {
					continue;
				} continue; {
				continue;
			} continue; if (notFound) {
			System.out.println(-1);
		} notFound {
			System.out.println(-1);
		} System.out.println(-1) System.out.println System.out System System.out -1 1 sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		// 結果の出力
		boolean notFound = true;
		for (int i = 10; i < 1010; i++) {
			if (Math.floor(i * 0.08) == A) {
				if (Math.floor(i * 0.1) == B) {
					System.out.println(i);
					notFound = false;
					break;
				}
				else {
					continue;
				}
			}
			else {
				continue;
			}
		}
		
		if (notFound) {
			System.out.println(-1);
		}

		sc.close();
	}
}
