Is it correct to say:

"I appreciate YOUR taking the time to write to us." ("your taking the time" as gerund)

or should we say:

"I appreciate YOU taking the time to write to us."???

Please help. Many thanks!