Valmiki Ramayana Bala Kanda Sarga 3 Shloka 6
Original Shlokaतत: पश्यति धर्मात्मा तत्सर्वं योगमास्थित: । पुरा यत्तत्र निर्वृत्तं पाणावामलकं यथा ।।1.3.6।।
1 source checked for this shloka
तत: thereafter, धर्मात्मा righteous Valmiki, योगम् spiritual meditation (yoga), आस्थित: having be taken himself, पुरा past, तत्र there, यत् all that, निर्वृत्तम् happened, तत् that, सर्वम् clearly, पाणौ in the palm of the hand, आमलकं यथा like an amalaka fruit, पश्यति saw.
With the power of yoga, the righteous (Valmiki) saw clearly, like an amalaka fruit in the palm of the hand the entire course of events that happened in the past relating to Rama.