import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	}
} Main public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	} main {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int min = -1; min -1 1 for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		} int i = 1; int i = 1; i 1 i<=10000 i 10000 i++ i++ i {
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		} {
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		} if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = 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 {
				min = i;
				break;
			} min = i min i break; System.out.println(min) System.out.println System.out System System.out min String args[] args public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	}
} public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int min = -1;
		
		for(int i = 1; i<=10000;i++){
			if((int)(i*0.08) == a && (int)(i*0.1) == b){
				min = i;
				break;
			}
		}
		
		System.out.println(min);
		
	}
}