unittest
{
	assert( [ "2 2" ].parse.expand.solve == 25 );
	assert( [ "8 10" ].parse.expand.solve == 100 );
	assert( [ "19 99" ].parse.expand.solve == -1 );
	
	assert( [ "80 100" ].parse.expand.solve == 1000 );		// 追加ケース
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto ab = input.front.split.to!( long[] );
	return tuple( ab[ 0 ], ab[ 1 ] );
}

auto solve( long a, long b )
{
	auto ans = 0L;
	foreach( i; 1L .. 1001L )
	{
		if( cast( long )( i * 0.08 ) == a && cast( long )( i * 0.1 ) == b ) return i;
	}
	return -1;
}
