import std.stdio,std.string,std.conv,std.algorithm;
import std.algorithm:rev=reverse;

int main(){
    auto input=readln.chomp.split;
    auto a=input[0].to!int;
    auto b=input[1].to!int;
    auto at=(a/0.08).to!int;
    auto bt=(b/0.1).to!int;
    foreach(y;bt..at+1){
        if((y*0.08).to!int==a&&(y*0.1).to!int==b){
            y.writeln;
            return 0;
        }   
    }   
    "-1".writeln;
    return 0;
}