The first line contains two integers nnn (2≤n≤500000)(2\le n\le 500\,000)(2≤n≤500000) and mmm (n−1≤m≤500000)(n-1\le m\le 500\,000)(n−1≤m≤500000), denoting the number of the satellites that form the GPS and the number of the measurements that we have made.
The following mmm lines decribe the mmm measurements. Each of the mmm lines contains five integers u,vu,vu,v (1≤u,v≤n,u≠v)(1\le u,v\le n, u \neq v)(1≤u,v≤n,u=v), x,yx,yx,y and zzz (−2×109≤x,y,z≤2×109)(-2 \times 10^9 \le x,y,z \le 2 \times 10^9)(−2×109≤x,y,z≤2×109), which means that the measurement result between the uuu-th and the vvv-th satellites is (x,y,z)(x,y,z)(x,y,z).
It is guaranteed that any (unordered) pair of satellites will not be measured more than once, and at least one measurement result might be mistaken.