import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  } 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 ans = -1; ans -1 1 for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    } int i=1; int i=1; i 1 i<1500 i 1500 i++ i++ i {
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    } {
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    } int tax8 = (int)(i * 0.08); tax8 (int)(i * 0.08) i 0.08 int tax10 = (int)(i * 0.1); tax10 (int)(i * 0.1) i 0.1 if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      } tax8 == A && tax10 == B tax8 == A tax8 A tax10 == B tax10 B {
        ans = i;
        break;
      } ans = i ans i break; if(tax8 > A || tax10 > B){
        break;
      } tax8 > A || tax10 > B tax8 > A tax8 A tax10 > B tax10 B {
        break;
      } break; System.out.println(ans) System.out.println System.out System System.out ans 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 ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int ans = -1;
    for(int i=1; i<1500; i++){
      int tax8 = (int)(i * 0.08);
      int tax10 = (int)(i * 0.1);
      if(tax8 == A && tax10 == B){
        ans = i;
        break;
      }else if(tax8 > A || tax10 > B){
        break;
      }
    }
    
    System.out.println(ans);
    
  }
}