import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	}
	
}


 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	}
	
} Main public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	} main {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int eight = scan.nextInt() eight scan.nextInt() scan.nextInt scan ten = scan.nextInt(); ten scan.nextInt() scan.nextInt scan for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		} int i = ten * 10; int i = ten * 10; i ten * 10 ten 10 i < ten * 10 + 10 i ten * 10 + 10 ten * 10 ten 10 10 i++ i++ i {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		} {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		} if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			} (int)(i * 0.08) == eight (int)(i * 0.08) i 0.08 eight {
				System.out.println(i);
				System.exit(0);
				
			} System.out.println(i) System.out.println System.out System System.out i System.exit(0) System.exit System 0 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[]) {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	}
	
} public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	}
	
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int eight = scan.nextInt(), ten = scan.nextInt();
		
		for(int i = ten * 10; i < ten * 10 + 10; i++) {
			if((int)(i * 0.08) == eight) {
				System.out.println(i);
				System.exit(0);
				
			}
			
		}
		
		System.out.println(-1);
		
	}
	
}



