import java.util.Scanner;
class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    int[] arr = new int[1];
    
    for(int i = 1; i < 10000000; i++) {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    }
    
    if(arr[0] == 0) {
      System.out.println("-1"); 
    } else {
      System.out.println(arr[0]); 
    }
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    int[] arr = new int[1];
    
    for(int i = 1; i < 10000000; i++) {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    }
    
    if(arr[0] == 0) {
      System.out.println("-1"); 
    } else {
      System.out.println(arr[0]); 
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    int[] arr = new int[1];
    
    for(int i = 1; i < 10000000; i++) {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    }
    
    if(arr[0] == 0) {
      System.out.println("-1"); 
    } else {
      System.out.println(arr[0]); 
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    int[] arr = new int[1];
    
    for(int i = 1; i < 10000000; i++) {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    }
    
    if(arr[0] == 0) {
      System.out.println("-1"); 
    } else {
      System.out.println(arr[0]); 
    }
  } 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 sc.close() sc.close sc int[] arr = new int[1]; arr new int[1] 1 for(int i = 1; i < 10000000; i++) {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    } int i = 1; int i = 1; i 1 i < 10000000 i 10000000 i++ i++ i {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    } {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    } if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      } i*8/100 == a && b == i*10/100 i*8/100 == a i*8/100 i*8 i 8 100 a b == i*10/100 b i*10/100 i*10 i 10 100 {
        arr[0] = i;
        break;
      } arr[0] = i arr[0] arr 0 i break; if(arr[0] == 0) {
      System.out.println("-1"); 
    } else {
      System.out.println(arr[0]); 
    } arr[0] == 0 arr[0] arr 0 0 {
      System.out.println("-1"); 
    } System.out.println("-1") System.out.println System.out System System.out "-1" {
      System.out.println(arr[0]); 
    } System.out.println(arr[0]) System.out.println System.out System System.out arr[0] arr 0 String[] args args
import java.util.Scanner;
class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    int[] arr = new int[1];
    
    for(int i = 1; i < 10000000; i++) {
      if(i*8/100 == a && b == i*10/100) {
        arr[0] = i;
        break;
      }
    }
    
    if(arr[0] == 0) {
      System.out.println("-1"); 
    } else {
      System.out.println(arr[0]); 
    }
  }
}