import 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();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	} 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 int ans = -1; ans -1 1 int max = 101 * 10; max 101 * 10 101 10 for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		} int i = 1; int i = 1; i 1 i < max i max i++ i++ i {
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		} {
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		} boolean flg = false; flg false if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			} (int)(i * 0.08) == A && (int)(i * 0.1) == B (int)(i * 0.08) == A (int)(i * 0.08) i 0.08 A (int)(i * 0.1) == B (int)(i * 0.1) i 0.1 B {
					flg = true;
					ans = i;
					break;
			} flg = true flg true ans = i ans i break; if(flg){
				break;
			} flg {
				break;
			} break; System.out.println(ans) System.out.println System.out System System.out ans 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();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	}
} Main
import 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();
		int ans = -1;
		int max = 101 * 10;
		for(int i = 1;i < max;i++){
			boolean flg = false;
			if((int)(i * 0.08) == A && (int)(i * 0.1) == B){
					flg = true;
					ans = i;
					break;
			}
			if(flg){
				break;
			}
		}
		System.out.println(ans);
	}
}