#include <bits/stdc++.h>
using namespace std;

int main() {int a,b,f=0,x;cin>>a>>b;
 for(int i=0;i<=1250;i++){
 if(2*i/25==a && i/10==b){f=1;x=i;break;}}
  if(f){cout<<x<<endl;}
   else{cout<<-1<<endl;}
}