#include #include #include #include #include #include #include #include #include #include #include #define ll long long #define PLL pair #define VS vector #define VL vector #define VB vector #define VPLL vector > #define VVL vector > #define VVVL vector > > #define VVB vector > #define rep(i,a) for (ll i=0;i=0;i--) #define INF 1000000000000000000 #define PI 3.141592653589793238 #define vmin(vec) *std::min_element(vec.begin(),vec.end()) #define vmax(vec) *std::max_element(vec.begin(),vec.end()) #define vsum(vec) std::accumulate(vec.begin(),vec.end(),0LL) #define ksort(vec) sort(vec.begin(), vec.end(), greater()) #define ssort(vec) (vec.begin(),vec.end()) #define VPLLsort(vec) sort(vec.begin(), vec.end(),[](PLL &a, PLL &b){ return a.first < b.first; }); #define LTS(n) to_string(n) #define STL(str) stoll(str) using namespace std; ll n, W, V; ll dfs(VVL &dp, VL &v, VL &w, ll index, ll weight){ if (index == n) return 0; if (weight > W) return 0; if (dp[index][weight] != -1) return dp[index][weight]; if (weight + w[index] <= W){ return dp[index][weight] = max(dfs(dp, v, w, index + 1, weight + w[index]) + v[index], dfs(dp, v, w, index + 1, weight)); } else{ return dp[index][weight] = dfs(dp, v, w, index + 1, weight); } } ll dfs(VL &v, VL &w, ll index, ll weight){ if (index == n) return 0; if (weight > W) return 0; if (weight + w[index] <= W){ return max(dfs(v, w, index + 1, weight + w[index]) + v[index], dfs(v, w, index + 1, weight)); } else{ return dfs(v, w, index + 1, weight); } } int main() { ll a, b; cin >> a >> b; if (b%a == 0) cout << b / a << endl; else cout << "NO" << endl; return 0; }