Group formation in games without spillovers