Is getting enough sleep more important than exercise when it comes to retaining information?

I've heard people barely sleeping and just studying while they're working out.

Which one plays a bigger role when it comes to remembering information?

I already know they're both super important.
Is getting enough sleep more important than exercise when it comes to retaining information?
Post Opinion