#include int main(){ int x,y; scanf("%d %d",&x,&y); printf("%d\n",(x%1000000007)*(y%1000000007)); }