import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	}
} Main public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	} main {
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	} try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		} {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			} int i = 1 ; int i = 1 ; i 1 i < 1500 i 1500 i++ i++ i {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			} {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			} int taxA = (int)Math.floor((double)i * 8 / 100); taxA (int)Math.floor((double)i * 8 / 100) Math.floor Math (double)i * 8 / 100 (double)i * 8 (double)i 8 100 int taxB = (int)Math.floor((double)i / 10); taxB (int)Math.floor((double)i / 10) Math.floor Math (double)i / 10 (double)i 10 if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				} taxA == a && taxB == b taxA == a taxA a taxB == b taxB b {
					System.out.println(i);
					return;
				} System.out.println(i) System.out.println System.out System System.out i return; 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){
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	}
} public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			
		
			for(int i = 1 ; i < 1500 ; i++ ) {
				
				int taxA = (int)Math.floor((double)i * 8 / 100);
				int taxB = (int)Math.floor((double)i / 10);
				
				
				if ( taxA == a && taxB == b) {
					System.out.println(i);
					return;
				}
			}
			
			System.out.println(-1);
			
		}
	}
}