A dancer took forward and backward steps of equal length during a dance. After taking 16 steps total, she was back at her starting position. How many steps did the dancer take in the forward and backward directions?