6

0 1 1
1 3 1
1 2 1
4 0 0
4 1 0
4 3 0
1 5 0
3 5 0
2 5 0