#include<iostream>
#include<cmath>
using namespace std;

int main(){
	int a,b;
	int c;
	cin>>a>>b;
	for(int c=1;c<=1001;c++){
		if(floor(c*0.08)==a&&floor(c*0.1)==b){
			cout<<c<<endl;
			return 0;
		}
	}
	cout<<"-1"<<endl;
	
	
	
}
