A contractor needs to buy nails to build a house. The nails come in small and large boxes. Each small box has 50 nails and each large box has 400 nails. The contractor bought 6 more small boxes than large boxes, which all together had 1200 nails. Create a system of equations to represent this situation. Use the system of equations to solve how many large and small boxes there were.