#include int main(void){ int n,m=0; scanf("%d%d",&n,&m); printf("%d",(n*m)%1000000007); }