title: prolog list of pairs
body: <p>I have an input of a list of pairs:</p>
  
  <pre><code>[[abs_(p,X,Y,Z),abs_(f,X,Y,Z)],[abs_(p,X,Y,Z),abs_(l,Z,P)]]
  </code></pre>
  
  <p>I want check if a pair have the same number of arguments, in this case yes:</p>
  
  <pre><code>[abs_(p,X,Y,Z),abs_(f,X,Y,Z)]
  </code></pre>
  
  <p>In the second case the answer is no.</p>
  
  <p>This is just an example because more generally, I want to know which pair have the same number of arguments. The output for the input should be:</p>
  
  <pre><code>[[abs_(p,X,Y,Z),abs_(f,X,Y,Z)]
  </code></pre>
  
  <p>What do I have to do?</p>