allocate pairs and singles into tables