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

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	}
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	} main {
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int stack; stack a *= 100 a 100 if((a/100)%2==1) a+=4; (a/100)%2==1 (a/100)%2 (a/100) a 100 2 1 a+=4 a 4 b *= 100 b 100 boolean b1 = (a+96)*100/8 < b*100/10; b1 (a+96)*100/8 < b*100/10 (a+96)*100/8 (a+96)*100 (a+96) a 96 100 8 b*100/10 b*100 b 100 10 if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10; (a+96)%100 == 0 (a+96)%100 (a+96) a 96 100 0 b1 = (a+88)*100/8 < b*100/10 b1 (a+88)*100/8 < b*100/10 (a+88)*100/8 (a+88)*100 (a+88) a 88 100 8 b*100/10 b*100 b 100 10 boolean b2 = (b+90)*100/10 < a*100/8; b2 (b+90)*100/10 < a*100/8 (b+90)*100/10 (b+90)*100 (b+90) b 90 100 10 a*100/8 a*100 a 100 8 boolean b3 = a*100/8 < b*100/10; b3 a*100/8 < b*100/10 a*100/8 a*100 a 100 8 b*100/10 b*100 b 100 10 if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        } b1 || b2 b1 b2 System.out.println(-1) System.out.println System.out System System.out -1 1 if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        } b3 {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        } stack = b*100/10/100 stack b*100/10/100 b*100/10/100 b*100 b 100 10 100 if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1); (int)(stack * 0.08) == a /100 (int)(stack * 0.08) stack 0.08 a /100 a 100 System.out.println(stack) System.out.println System.out System System.out stack System.out.println(stack + 1) System.out.println System.out System System.out stack + 1 stack 1 if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        } !b3 b3 {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        } stack = a*100/8/100 stack a*100/8/100 a*100/8/100 a*100 a 100 8 100 if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1); (int)(stack * 0.1) == b/100 (int)(stack * 0.1) stack 0.1 b/100 b 100 System.out.println(stack) System.out.println System.out System System.out stack System.out.println(stack + 1) System.out.println System.out System System.out stack + 1 stack 1 String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	}
} Main
import java.util.*;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int a = sc.nextInt();
      	int b = sc.nextInt();
      	int stack;
      	
      	a *= 100;
      	if((a/100)%2==1) a+=4;
      	b *= 100;
      
      	boolean b1 = (a+96)*100/8 < b*100/10;
      	if((a+96)%100 == 0) b1 = (a+88)*100/8 < b*100/10;
      	boolean b2 = (b+90)*100/10 < a*100/8;
      	boolean b3 = a*100/8 < b*100/10;
      
      	if(b1 || b2) System.out.println(-1);
      	else if(b3) {
          stack = b*100/10/100;
          if((int)(stack * 0.08) == a /100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        else if(!b3) {
          stack = a*100/8/100;
          if((int)(stack * 0.1) == b/100) System.out.println(stack);
          else System.out.println(stack + 1);
        }
        
	}
}
