Triangle
On the plane, located the N (3 ≤ N) points. Of these, randomly selected three points, which are then connected by segments. Required to determine the expectation of the perimeter of a triangle, provided that each set of three points can be chosen with equal probability, and the resulting triangle can be degenerate.
Input
The first line of the input file contains two numbers H and W (1 ≤ H, W ≤ 700). This is followed by lines of H characters. j-th symbol of the i-th row is equal to '1' if there is a point with coordinates (i, j), otherwise the corresponding position is a symbol of '0'. It is guaranteed that the input data are presented as at least three points.
Output
The output file output a single number - the expectation of the perimeter of a triangle. The answer must differ from the correct no more than 10^{-6}.