An engineering school has a bridge building competition where students must build as many beam bridges and truss bridges as they can using Popsicle sticks and glue. A beam bridge requires 30 Popsicle sticks and 5 units of glue while a truss bridge requires 50 Popsicle sticks and 8 units of glue. Each team has at most 600 Popsicle sticks and 100 units of glue. In addition, each team can build at most 5 truss bridges and the number of beam bridges must be larger than the number of truss bridges. If a beam bridge can hold 40 grams and a truss bridge can hold 60 grams, how many of each bridge should a team build to maximize the total mass that can be supported?