P11460 [AOJ] There is No Alternative
普及
题目描述

Example

Input

4 4
1 2 3
1 3 3
2 3 3
2 4 3

Output

1 3

输入格式

见题面

输出格式

见题面

样例输入
4 4 1 2 3 1 3 3 2 3 3 2 4 3
样例输出
1 3