P15910 [HackerEarth] Gautam Buddha University V.C. has planned a tour for GBU students. For the tour, V.C. decided to book cars. The students are ready to go on one condtition:
提高
题目描述

Gautam Buddha University V.C. has planned a tour for GBU students. For the tour, V.C. decided to book cars. The students are ready to go on one condtition:
If two students are friends then they do not want to go in different cars.

Due to this condition, V.C. cannot decide that how many cars will be needed for the tour. And for each car he also needs one leader in the car.

As you are a programmer, so V.C. is giving you this task. Find the maximum number of cars he will need for the tour and the total number of ways of selecting leader in each car.

Input:
First line contains n, which denotes the number of students that will go for the tour.
Second line contains m, which denotes the number of friendship relation between students.
Next m lines will have two space separated integers a,b.
Consider mutual friendship(a is a friend of b and vice versa).

Output:
Output a single line containing two space separated integers - maximum number of cars he will be needed and the number of ways of selecting the leaders. Leaders will be modulo (10^6)+7.

Note: Assume Capacity of a Car is unlimited.

Constraints:
1 ≤ n ≤ 10^5
1 ≤ m ≤ 10^5
1 ≤ a,b ≤ 10^5

SAMPLE INPUT
6
3
1 2
3 4
5 6

SAMPLE OUTPUT
3 8

Explanation

In this sample we need three cars in which students are (1,2) ,(3,4),(5,6) and total number ways of selecting leaders in cars will be 8.

输入格式

见题面

输出格式

见题面

样例输入
135 44 110 49 78 43 24 101 110 62 110 14 133 82 69 67 132 27 61 53 11 40 71 129 20 6 45 123 61 42 48 126 29 68 110 83 56 52 56 75 81 24 23 103 120 17 113 37 71 131 108 124 118 59 97 106 90 57 90 26 80 108 73 125 15 5 3 74 25 50 93 20 45 55 112 12 121 41 32 33 84 2 1 98 39 72 23 97 81 118
样例输出
91 982980