Patanjali Yoga Sutra 1.5–1.6
The turnings are fivefold, afflicted or unafflicted: valid knowing, error, fantasy, sleep, and memory.
वृत्तयः पञ्चतय्यः क्लिष्टाक्लिष्टाः ॥
प्रमाणविपर्ययविकल्पनिद्रास्मृतयः ॥
vrttayah pancatayyah klista-aklistah ||
pramana-viparyaya-vikalpa-nidra-smrtayah ||
The turnings are fivefold, afflicted or unafflicted: valid knowing, error, fantasy, sleep, and memory.
Not every thought is a problem. The mind has five basic types of activities, and they can either help you or hurt you: