"""
count = 0
n = 1
while count <= 500:
count = 1
n += 1
for i in range(1, int(tri(n) ** 0.5) + 1):
if not tri(n) % i:
count += 2
if int(tri(n) ** 0.5) == tri(n) ** 0.5:
count -= 1
print n, tri(n)
def ext13():
from math import sqrt
n = 0
counter = 0
while counter <= 500:
counter = 1
n += 1
for i in range(1, int(sqrt(tri(n))) + 1): # 从1尝试到int(sqrt(tri(n)))
if not tri(n) % i:
counter += 2
if int(sqrt(tri(n))) == sqrt(tri(n)):
counter -= 1
# print counter
print n, tri(n)