import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	} 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 double res = 0; res 0 while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		} res<=20000 res 20000 {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		} if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			} res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1 res * 0.1 >= B res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1 res * 0.08 >= A res * 0.08 res 0.08 A res * 0.08 < A + 1 res * 0.08 res 0.08 A + 1 A 1 res * 0.1 >= B res * 0.1 res 0.1 B res * 0.1 < B + 1 res * 0.1 res 0.1 B + 1 B 1 {
				break;
			} break; res++ res if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		} (int)res!=20001 (int)res 20001 {
			System.out.println((int)res);
		} System.out.println((int)res) System.out.println System.out System System.out (int)res {
			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) throws Exception {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double res = 0;
		while (res<=20000) {
			if(res * 0.08 >= A && res * 0.08 < A + 1 && res * 0.1 >= B && res * 0.1 < B + 1) {
				break;
			}
			res++;
		}
		if((int)res!=20001) {
			System.out.println((int)res);
		}else {
			System.out.println(-1);
		}
	}
}