I was wondering if somebody could help me with a problem I am having. I am trying to compute:

9983^2052765 mod 36581 and 13461^2052765 mod 36581

I am pretty sure it can be accomplished with the square and multiply method but I'm not to sure as to how to accomplish this. Could anyone point me in the right direction or get me started off?