# 【莫比乌斯反演】[HYSBZ/BZOJ2301]Problem b

ans=g(c,d,k)g(a1,d,k)g(b,c1,k)+g(a1,c1,k)

1<=x<=n,1<=y<=m，满足gcd(x,y)是k的(x,y)的对数也等价于1<=x<=n/k,1<=y<=m/k,(x,y)互质的对数，即
g(n,m,k)=g(n/k,m/k,1)

F(i)=i|df(d)=>f(i)=i|dμ(di)F(d)=i|dμ(di)ndmd

int cal(int n,int m){
int t=min(m,n),last,ret=0,i;
for(i=1;i<=t;i=last+1){
last=min(n/(n/i),m/(m/i));
ret+=(sum[last]-sum[i-1])*(n/i)*(m/i);
}
return ret;
}

#include<cstdio>
#include<algorithm>
using namespace std;
#define MAXN 50000
int a,b,c,d,k,p[MAXN+10],pcnt,mu[MAXN+10],sum[MAXN+10],ans,n;
bool f[MAXN+10];
char c;
while(c=getchar(),c!=EOF)
if(c>='0'&&c<='9'){
x=c-'0';
while(c=getchar(),c>='0'&&c<='9')
x=x*10+c-'0';
ungetc(c,stdin);
return;
}
}
void prepare(){
int i,j;
mu[1]=sum[1]=1;
for(i=2;i<=MAXN;i++){
if(!f[i])
p[++pcnt]=i,mu[i]=-1;
for(j=1;p[j]*i<=MAXN;j++){
f[p[j]*i]=1;
if(i%p[j]==0){
mu[p[j]*i]=0;
break;
}
mu[p[j]*i]=-mu[i];
}
sum[i]=sum[i-1]+mu[i];
}
}
int cal(int n,int m){
int t=min(m,n),last,ret=0,i;
for(i=1;i<=t;i=last+1){
last=min(n/(n/i),m/(m/i));
ret+=(sum[last]-sum[i-1])*(n/i)*(m/i);
}
return ret;
}
void solve(int a,int b,int c,int d,int k){
a--,c--;
a/=k,b/=k,c/=k,d/=k;
ans=cal(b,d)-cal(a,d)-cal(b,c)+cal(a,c);
}
int main()
{
prepare();
while(n--){
}