Spencer had room for 16 rows of tomatoes and onions in his garden. He planted 3 rows of tomatoes for every 5 rows of onions. How many rows of tomatoes did he plant?