a,b Special Points | HackerRank

Find the number a,b special points in a given graph