def distance(x1, y1, x2, y2):
return ((x2 - x1)**2 + (y2 - y1)**2)**0.5
def stability(x1, y1, x2, y2, x3, y3):
dist12 = distance(x1, y1, x2, y2)
dist13 = distance(x1, y1, x3, y3)
dist23 = distance(x2, y2, x3, y3)
return max(dist12, dist13, dist23) - min(dist12, dist13, dist23)
def get_triumvirates(n, coordinates):
triumvirates = []
for i in range(0, n, 3):
triumvirates.append([i, i + 1, i + 2])
return triumvirates
def get_score(n, coordinates):
triumvirates = get_triumvirates(n, coordinates)
score = 0
for t in triumvirates:
x1, y1 = coordinates[t[0]]
x2, y2 = coordinates[t[1]]
x3, y3 = coordinates[t[2]]
score += stability(x1, y1, x2, y2, x3, y3)
return score
def main():
n = int(input())
coordinates = []
for _ in range(n):
x, y = map(int, input().split())
coordinates.append((x, y))
triumvirates = get_triumvirates(n, coordinates)
for t in triumvirates:
print(*t)
if __name__ == "__main__":
main()
ZGVmIGRpc3RhbmNlKHgxLCB5MSwgeDIsIHkyKToKICAgIHJldHVybiAoKHgyIC0geDEpKioyICsgKHkyIC0geTEpKioyKSoqMC41CgpkZWYgc3RhYmlsaXR5KHgxLCB5MSwgeDIsIHkyLCB4MywgeTMpOgogICAgZGlzdDEyID0gZGlzdGFuY2UoeDEsIHkxLCB4MiwgeTIpCiAgICBkaXN0MTMgPSBkaXN0YW5jZSh4MSwgeTEsIHgzLCB5MykKICAgIGRpc3QyMyA9IGRpc3RhbmNlKHgyLCB5MiwgeDMsIHkzKQogICAgcmV0dXJuIG1heChkaXN0MTIsIGRpc3QxMywgZGlzdDIzKSAtIG1pbihkaXN0MTIsIGRpc3QxMywgZGlzdDIzKQoKZGVmIGdldF90cml1bXZpcmF0ZXMobiwgY29vcmRpbmF0ZXMpOgogICAgdHJpdW12aXJhdGVzID0gW10KICAgIGZvciBpIGluIHJhbmdlKDAsIG4sIDMpOgogICAgICAgIHRyaXVtdmlyYXRlcy5hcHBlbmQoW2ksIGkgKyAxLCBpICsgMl0pCiAgICByZXR1cm4gdH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