    import java.util.*;
    public class Main {
     
    	public static void main(String[] args) {
    		Scanner scan = new Scanner(System.in);
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    }	
    }
// end  import java.util.*; util.* java public class Main {
     
    	public static void main(String[] args) {
    		Scanner scan = new Scanner(System.in);
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    }	
    } Main public static void main(String[] args) {
    		Scanner scan = new Scanner(System.in);
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    } main {
    		Scanner scan = new Scanner(System.in);
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a=Integer.parseInt(scan.next()); a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int b=Integer.parseInt(scan.next()); b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		} int i=1; int i=1; i 1 i<1010 i 1010 ++i ++i i {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		} {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		} if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			} (int)(i*0.08)==a && (int)(i*0.1)==b (int)(i*0.08)==a (int)(i*0.08) i 0.08 a (int)(i*0.1)==b (int)(i*0.1) i 0.1 b {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			} System.out.print(i) System.out.print System.out System System.out i System.exit(0) System.exit System 0 break; System.out.print(-1) System.out.print 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 a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    }	
    } public class Main {
     
    	public static void main(String[] args) {
    		Scanner scan = new Scanner(System.in);
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    }	
    } Main
    import java.util.*;
    public class Main {
     
    	public static void main(String[] args) {
    		Scanner scan = new Scanner(System.in);
    		int a=Integer.parseInt(scan.next());
    		int b=Integer.parseInt(scan.next());
    		
    		for (int i=1;i<1010;++i) {
    			if ((int)(i*0.08)==a && (int)(i*0.1)==b) {
    				System.out.print(i);
    				System.exit(0);
    				break;
    			}
    		}
    		System.out.print(-1);
    		
    		
    }	
    }
// end 