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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        break;
      }
    } int i = 0; int i = 0; i 0 i <= 1000 i 1000 i++ i++ i {
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        break;
      }
    } {
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        break;
      }
    } int tax_a = (i * 8) / 100; tax_a (i * 8) / 100 (i * 8) i 8 100 int tax_b = (i * 10) / 100; tax_b (i * 10) / 100 (i * 10) i 10 100 if(tax_a == a && tax_b == b){
        ans = i;
        break;
      } tax_a == a && tax_b == b tax_a == a tax_a a tax_b == b tax_b b {
        ans = i;
        break;
      } ans = i ans i 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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        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 = 0; i <= 1000; i++){
      int tax_a = (i * 8) / 100;
      int tax_b = (i * 10) / 100;

      if(tax_a == a && tax_b == b){
        ans = i;
        break;
      }
    }

    System.out.println(ans);
  }
}