#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>l>>h; vector c(n); for(Int i=0;i>c[i]; const Int MAX = 1e9+100; auto lcm=[&](Int x,Int y){ if(max(x,y)>=MAX) return MAX; Int l=x/__gcd(x,y)*y; return min(MAX,l); }; auto calc= [&](Int x){ Int s=1< dp(s); for(Int b=0;b>i)&1) l=lcm(l,c[i]); dp[b]=x/l; } for(Int i=0;i>i)&1) dp[b]-=dp[b|(1<