#include<bits/stdc++.h>
using namespace std;
#define ll long long int
string s;
	



int main()
{
 ll a, b;
 cin>>a>>b;

ll x,y;

for(ll i=1;i<=1250;i++)
{
	x=(i*8)/100;
	y=(i*10)/100;
	if(x==a&&y==b)return cout<<i,0;
}
cout<<-1;
}

