#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	for(int i=1;i<=20000;i++){
		int a1=i*0.08;
		int a2=i*0.1;
		if(a1==a && a2==b){
			cout<<i;
			return 0;
		}
	} 
	cout<<-1;
	return 0;
} 