class Solution {
public:
bool divideArray(vector& nums) {
int ar[501];
for( int num:nums){
ar[num]++;
}
for( int element : ar ){
if( element%2 != 0) return false;
}
return true;
}
};