A Hierarchical Method for Large-Scale Two-Dimensional Layout