------
## 最终结论
```python
def can_form_square(matchsticks):
    total_length = sum(matchsticks)
    
    # Check if total length is a multiple of 4
    if total_length % 4 != 0:
        return False
    
    # Calculate the target length for each side
    target_length = total_length // 4
    
    # Sort matchsticks in descending order for optimization
    matchsticks.sort(reverse=True)
    
    # Initialize sides of the square
    sides = [0] * 4
    
    def backtrack(index):
        if index == len(matchsticks):
            return all(side == target_length for side in sides)
        
        for i in range(4):
            if sides[i] + matchsticks[index] <= target_length:
                sides[i] += matchsticks[index]
                if backtrack(index + 1):
                    return True
                sides[i] -= matchsticks[index]
            
            # If current side is 0 after backtracking, no need to try other empty sides
            if sides[i] == 0:
                break
        
        return False
    
    return backtrack(0)

# Example usage:
print(can_form_square([1,1,2,2,2]))  # Output: True
print(can_form_square([3,3,3,3,4]))  # Output: False
```