import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int A  = keyboard.nextInt(); A keyboard.nextInt() keyboard.nextInt keyboard int B  = keyboard.nextInt(); B keyboard.nextInt() keyboard.nextInt keyboard int ans = -1; ans -1 1 for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		} int i = 1; int i = 1; i 1 i<1500 i 1500 i++ i++ i {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		} {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		} if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} i*8/100 == A && i*10/100 == B i*8/100 == A i*8/100 i*8 i 8 100 A i*10/100 == B i*10/100 i*10 i 10 100 B {
				ans = i;
				break;
			} ans = i ans i break; System.out.print(ans) System.out.print System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int A  = keyboard.nextInt();
		int B  = keyboard.nextInt();
		
		int ans = -1;
		
		for(int i = 1; i<1500; i++) {
			if(i*8/100 == A && i*10/100 == B) {
				ans = i;
				break;
			} 
		}
				
		System.out.print(ans);
		keyboard.close();	
	}
}
