#include <bits/stdc++.h>
using namespace std;
#define RG register int
#define LL long long
namespace Mod{
class Modulus{
public:
static const LL mo=1000000007LL;
LL num;
static LL mod(LL x);
static void read(Modulus &a);
static LL expow(LL a,LL m);
Modulus(const LL x=0LL):num(mod(x)){}
Modulus(const Modulus &a):num(a.num){}
void output(){printf("%lld",num);}
void operator=(const LL x){num=mod(x);}
void operator=(const Modulus &x){num=x.num;}
Modulus operator+(const Modulus &rhs){return Modulus(mod(num+rhs.num));}
Modulus operator-(const Modulus &rhs){return Modulus(mod(num-rhs.num));}
Modulus operator*(const Modulus &rhs){return Modulus(mod(num*rhs.num));}
Modulus operator/(const Modulus &rhs){return Modulus(mod(num*expow(rhs.num,mo-2)));}
Modulus operator+(LL x){return Modulus(mod(num+x));}
Modulus operator-(LL x){return Modulus(mod(num-x));}
Modulus operator*(LL x){return Modulus(mod(num*x));}
Modulus operator/(LL x){return Modulus(mod(num*expow(x,mo-2)));}
Modulus operator^(LL x){return Modulus(expow(num,x));}
friend ostream &operator<<(ostream &output,const Modulus &x){
output<<x.num;return output;
}
friend istream &operator>>(istream &input,Modulus &x){
input>>x.num;
return input;
}
};
LL Modulus::mod(LL x){
if(x<0) return (x%mo+mo)%mo;
else if(x>=mo) return x%mo;
return x;
}
void Modulus::read(Modulus &a){
LL X=0,w=0; char ch=0;
while(!isdigit(ch)) {w|=ch=='-';ch=getchar();}
while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();
a.num=mod(w?-X:X);
}
LL Modulus::expow(LL a,LL n){
LL x=1,p=mod(a);
while(n){
if(n&1) x=mod(x*p);
p=mod(p*p);
n>>=1;
}
return x;
}
};
int main(){
Mod::Modulus a,b,c;
Mod::Modulus::read(a);
Mod::Modulus::read(b);
Mod::Modulus::read(c);
cout<<a*b/c<<endl;
return 0;
}