#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(int i=(a);i<(b);++i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define MOD 1000000007 int main(){ int a,b; cin>>a>>b; int la = max(0,10*a-5); int ha = min(1000,10*a+5); int lb = max(0,10*b-5); int hb = min(1000,10*b+5); int mn = 1000000; rep(i,0,1000){ rep(j,0,1000){ if(la*(i+j)<=1000*i&&1000*i