Matchsticks to Square

Given an array of matchstick lengths, determine whether you can arrange all matchsticks to form a square without breaking any. Each matchstick is used exactly once as part of a side.

Examples
Input: [1,1,2,2,2]
Output: true
Hints

Matchsticks to Square

Given an array of matchstick lengths, determine whether you can arrange all matchsticks to form a square without breaking any. Each matchstick is used exactly once as part of a side.