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