import java.util.*;
import java.lang.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
		int B = scan.nextInt();
		
		int atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	}
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
		int B = scan.nextInt();
		
		int atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
		int B = scan.nextInt();
		
		int atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	} main {
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
		int B = scan.nextInt();
		
		int atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	} 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 atai = -1; atai -1 1 int[] c = new int[1001]; c new int[1001] 1001 int[] d = new int[1001]; d new int[1001] 1001 for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		} int i=1; int i=1; i 1 i<=1000 i 1000 i++ i++ i {
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		} {
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		} c[i] = (int)(i*0.08) c[i] c i (int)(i*0.08) i 0.08 if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			} c[i]==A c[i] c i A {
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			} for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				} int j=1; int j=1; j 1 j<=1000 j 1000 j++ j++ j {
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				} {
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				} d[j] = (int)(j*0.10) d[j] d j (int)(j*0.10) j 0.10 if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					} d[j] == B d[j] d j B {
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					} if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						} i==j i j {
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						} atai = i atai i System.out.println(atai) System.out.println System.out System System.out atai System.exit(0) System.exit System 0 System.out.println(atai) System.out.println System.out System System.out atai 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 atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
		int B = scan.nextInt();
		
		int atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	}
} Main
import java.util.*;
import java.lang.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
		int B = scan.nextInt();
		
		int atai = -1;
		
		int[] c = new int[1001];
		int[] d = new int[1001];
		
		for(int i=1; i<=1000; i++){
			c[i] = (int)(i*0.08);
			
			if(c[i]==A){
				for(int j=1; j<=1000; j++){
					d[j] = (int)(j*0.10);
					
					if(d[j] == B){
						if(i==j){
							atai = i; 
							System.out.println(atai);
							System.exit(0);
							
						}
					}
				}
			}
		}
	
		System.out.println(atai);
	}
}