A bag of marbles contains only purple and yellow marbles. The bag has 3 times as many yellow marbles as purple. The bag contains 164 total marbles. Write an equation or system of equations to find out how many of each color of marble is in the bag.