A sandwich shop prepares 3 sandwiches in 126 seconds and 8 sandwiches in 336 seconds. At this rate, how many seconds will it take to prepare 5 sandwiches?