import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int mini = 10000;
		
		for(int i = 1; i < 1001; ++i){
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		}
		
		//System.out.println(a);
		//System.out.println(b);
		//System.out.println(mini);
		
		if(mini == 10000) System.out.println(-1);
		else System.out.println(mini);
		
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int mini = 10000;
		
		for(int i = 1; i < 1001; ++i){
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		}
		
		//System.out.println(a);
		//System.out.println(b);
		//System.out.println(mini);
		
		if(mini == 10000) System.out.println(-1);
		else System.out.println(mini);
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int mini = 10000;
		
		for(int i = 1; i < 1001; ++i){
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		}
		
		//System.out.println(a);
		//System.out.println(b);
		//System.out.println(mini);
		
		if(mini == 10000) System.out.println(-1);
		else System.out.println(mini);
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int mini = 10000;
		
		for(int i = 1; i < 1001; ++i){
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		}
		
		//System.out.println(a);
		//System.out.println(b);
		//System.out.println(mini);
		
		if(mini == 10000) System.out.println(-1);
		else System.out.println(mini);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int mini = 10000; mini 10000 for(int i = 1; i < 1001; ++i){
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		} int i = 1; int i = 1; i 1 i < 1001 i 1001 ++i ++i i {
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		} {
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		} int a_ans = (int)(i * 0.08); a_ans (int)(i * 0.08) i 0.08 int b_ans = (int)(i * 0.10); b_ans (int)(i * 0.10) i 0.10 if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue; (a_ans == a) && (b_ans == b) (a_ans == a) a_ans a (b_ans == b) b_ans b {
		        if(mini >= i) mini = i;
		        else continue;
		    } if(mini >= i) mini = i;
		        else continue; mini >= i mini i mini = i mini i continue; continue; if(mini == 10000) System.out.println(-1);
		else System.out.println(mini); mini == 10000 mini 10000 System.out.println(-1) System.out.println System.out System System.out -1 1 System.out.println(mini) System.out.println System.out System System.out mini String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int mini = 10000;
		
		for(int i = 1; i < 1001; ++i){
		    
		    int a_ans = (int)(i * 0.08);
		    int b_ans = (int)(i * 0.10);
		    
		    if((a_ans == a) && (b_ans == b)) {
		        if(mini >= i) mini = i;
		        else continue;
		    }
		    else continue;
		}
		
		//System.out.println(a);
		//System.out.println(b);
		//System.out.println(mini);
		
		if(mini == 10000) System.out.println(-1);
		else System.out.println(mini);
		
	}
}