import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    System.out.println(solve(a, b));

  }

  static int solve(int a, int b) {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  }
} import java.util.Scanner; Scanner 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();
    sc.close();
    System.out.println(solve(a, b));

  }

  static int solve(int a, int b) {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    System.out.println(solve(a, b));

  } main {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    System.out.println(solve(a, b));

  } 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 System.out.println(solve(a, b)) System.out.println System.out System System.out solve(a, b) solve a b String[] args args static int solve(int a, int b) {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  } solve {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  } for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    } int price = b * 10; int price = b * 10; price b * 10 b 10 price < (b + 1) * 10 price (b + 1) * 10 (b + 1) b 1 10 price++ price++ price {
      if (price * 8 / 100 == a) {
        return price;
      }
    } {
      if (price * 8 / 100 == a) {
        return price;
      }
    } if (price * 8 / 100 == a) {
        return price;
      } price * 8 / 100 == a price * 8 / 100 price * 8 price 8 100 a {
        return price;
      } return price; price return -1; -1 1 int a a int b b public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    System.out.println(solve(a, b));

  }

  static int solve(int a, int b) {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    System.out.println(solve(a, b));

  }

  static int solve(int a, int b) {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    sc.close();
    System.out.println(solve(a, b));

  }

  static int solve(int a, int b) {
    for (int price = b * 10; price < (b + 1) * 10; price++) {
      if (price * 8 / 100 == a) {
        return price;
      }
    }
    return -1;
  }
}