#include<bits/stdc++.h>
using namespace std;
int a,b,x;
int main()
{
	cin>>a>>b;
	for(x=0;x<11111;++x)
	{
		int c=x/10;
		int d=x*8/100;
		if(c==b and d==a){cout<<x<<endl;return 0;}
	}
	cout<<-1;
	return 0;
}
