Factorization of partitions in two-dimensional lattices and complexity estimates