#include <iostream>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  for (int i = 0; i <= 1250; i++) {
    if ((int) (i * .08) == a && (int) (i * .10) == b) {
      cout << i;
      exit(0);
    }
  }
  cout << -1;
}