Statistical mechanics of the two-dimensional assembly