import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;

void main() {
  int a, b;
  readf (" %d %d", &a, &b);
  foreach (s; 0 .. 1_000_000) {
    int x = (s * 8) / 100;
    if (x != a) continue;
    int y = s / 10;
    if (y != b) continue;
    writeln (s);
    return;
  }
  writeln (-1);
}

