Company: Titan_27sep
Difficulty: medium
Code Mania Problem Description "Code Mania" is a very famous coding challenge. Radha is responsible for sending our country's team to this contest. She is planning to send 2 people to the Contest. She wants them to be from different states of our country. She has a list of size p consisting of pairs of programmer ids. Each pair of programmers are from the same state. Please note that if programmers with id 1 and id 2 are from the same state and programmers with id 1 and id 5 are from the same state, then programmers with id 2 and id 5 will also be from the same state. If she has N programmer ids, then determine how many pairs of programmers from different states she can choose from. Input Format The first line contains two integers N and p, the number of programmers, and the number of pairs. Each of the next p lines contains 2 space-separated integers denoting programmers' ids of two who share the same state. Output Format Print the number of valid pairs. Examples Example 1: Input: 5 3