"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));   
   let color = xs.sort((a, b) => b - a);
   console.log(color);
   let count = 0;
   for(let i =0; i < xs.length; i++){
      if(color[i]!=color[i+1]){
        count++;
      }
   }
   console.log(count);
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));