Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT edges = [ [ 1 , 2 ] , [ 2 , 3 ] , [ 3 , 1 ] , [ 4 , 3 ] , [ 4 , 5 ] , [ 5 , 3 ] ] NEW_LINE size = len ( edges ) NEW_LINE n = 5 NEW_LINE prime = [ True for i in range ( n + 2 ) ] NEW_LINE SieveOfEratosthenes ( prime , n + 1 ) NEW_LINE for i in range ( size ) : NEW_LINE INDENT graph [ edges [ i ] [ 0 ] ] [ edges [ i ] [ 1 ] ] = 1 NEW_LINE graph [ edges [ i ] [ 1 ] ] [ edges [ i ] [ 0 ] ] = 1 NEW_LINE d [ edges [ i ] [ 0 ] ] += 1 NEW_LINE d [ edges [ i ] [ 1 ] ] += 1 NEW_LINE DEDENT ans = 0 NEW_LINE primeCliques ( 0 , 1 , prime ) NEW_LINE print ( ans ) NEW_LINE DEDENT