Skip to main content
1 of 2
Doorknob
  • 71.8k
  • 20
  • 143
  • 385

Mathematica, 25 bytes

Tally@#~MatchQ~{{_,2}..}&

Try it online!

The Tally function returns a list of the form {{element, count}, ...}, which is then matched against a pattern that checks whether all count are 2.

Doorknob
  • 71.8k
  • 20
  • 143
  • 385