#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B,i;cin>>A>>B; 
  for(i=10*B;i<10*(B+1);i++){
    if(25*A<=2*i&&2*i<25*(A+1))break;
  }
  if(i<10*(B+1))cout<<i<<endl;
  else cout<<"-1"<<endl;
}
