GenRec: UnifyingVideoGenerationandRecognition withDiffusionModels