{"raw_statement":[{"iden":"problem statement","content":"Takahashi has received an undirected graph with $N$ vertices, numbered $1$, $2$, ..., $N$. The edges in this graph are represented by $(u_i, v_i)$. There are no self-loops and multiple edges in this graph.\nBased on this graph, Takahashi is now constructing a new graph with $N^2$ vertices, where each vertex is labeled with a pair of integers $(a, b)$ ($1 \\leq a \\leq N$, $1 \\leq b \\leq N$). The edges in this new graph are generated by the following rule:\n\n*   Span an edge between vertices $(a, b)$ and $(a', b')$ if and only if both of the following two edges exist in the original graph: an edge between vertices $a$ and $a'$, and an edge between vertices $b$ and $b'$.\n\nHow many connected components are there in this new graph?"},{"iden":"constraints","content":"*   $2 \\leq N \\leq 100,000$\n*   $0 \\leq M \\leq 200,000$\n*   $1 \\leq u_i < v_i \\leq N$\n*   There exists no pair of distinct integers $i$ and $j$ such that $u_i = u_j$ and $v_i = v_j$."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$\n$u_1$ $v_1$\n$u_2$ $v_2$\n:\n$u_M$ $v_M$"},{"iden":"sample input 1","content":"3 1\n1 2"},{"iden":"sample output 1","content":"7\n\nThe graph constructed by Takahashi is as follows.\n![image](https://atcoder.jp/img/agc011/6d34a4ddeba67b2286c00acda56abbcc.png)"},{"iden":"sample input 2","content":"7 5\n1 2\n3 4\n3 5\n4 5\n2 6"},{"iden":"sample output 2","content":"18"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}