import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  }
} Main public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  } main {
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  } Scanner inp = new Scanner(System.in); inp new Scanner(System.in) int a = inp.nextInt(); a inp.nextInt() inp.nextInt inp int b = inp.nextInt(); b inp.nextInt() inp.nextInt inp int f=-1; f -1 1 for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    } int i=0; int i=0; i 0 i<100000 i 100000 i++ i++ i {
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    } {
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    } int t1 = (i*8)/100; t1 (i*8)/100 (i*8) i 8 100 int t2 = (i*10)/100; t2 (i*10)/100 (i*10) i 10 100 if(t1==a && t2==b){
        f=i;
        break;
      } t1==a && t2==b t1==a t1 a t2==b t2 b {
        f=i;
        break;
      } f=i f i break; System.out.println(f) System.out.println System.out System System.out f String[] args args public class Main{
  public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  }
} public class Main{
  public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    int a = inp.nextInt();
    int b = inp.nextInt();
    int f=-1;
    for( int i=0; i<100000; i++){
      int t1 = (i*8)/100;
      int t2 = (i*10)/100;
      if(t1==a && t2==b){
        f=i;
        break;
      }
    }
    System.out.println(f);

  }
}