Maine shooting suspect bought guns legally