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

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

void main(){
	bool finished = false;
	auto tax = readNums!int;
	foreach(i; 0 .. 1001){
		if(floor(i * 0.08) == tax[0] && floor(i * 0.1) == tax[1]){
			i.writeln;
			finished = true;
			break;
		}
	}
	if(!finished){
		writeln(-1);
	}
}
