process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  const input = lines[0].split(" ");
  const a = Number(input[0]);
  const b = Number(input[1]);
  const least_a = a / 0.08
  const least_b = b / 0.1
  const most_a = (a+1) / 0.08
  const most_b = (b+1) / 0.1
  var res;
  if (least_a > most_b || least_b > most_a)
    return console.log(-1);
  else {
    res = least_a < least_b ? Math.ceil(least_b) : Math.ceil(least_a);
    if (res > most_a || res > most_b) return console.log(-1);
    else console.log(res);
  }

});
