A baseball team sells tickets for a game. The ratio of sold tickets to unsold tickets is 5:2. There were 240 more tickets sold than unsold. How many tickets were sold? How many were unsold?