import std;

auto input()
{
    return readln().chomp();
}

alias sread = () => readln.chomp();
alias aryread(T = long) = () => readln.split.to!(T[]);

void main()
{
    long a, b;
    scan(a, b);
    foreach (i; 0 .. 1001)
    {

        if (((i * 8) / 100 == a) && ((i * 10) / 100 == b))
        {
            writeln(i);
            return;
        }

    }

    writeln(-1);

}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}
