hr = int(input())
if (hr < 100 and hr > 1):
if hr % 2:
print('I-' + str(hr) + ' is primary, going north/south.' )
else:
print('I-' + str(hr) + ' is primary, going east/west.')
elif (hr == 200):
print(hr,'is not a valid interstate highway number.')
elif (hr < 1000 and hr > 99):
if(hr%2):
print('I-' + str(hr) + ' is auxiliary, serving I-'+ str(hr)[1:] +', going north/south.')
else:
print('I-' + str(hr) + ' is auxiliary, serving I-'+ str(hr)[1:] +', going east/west.')
else:
print(hr,'is not a valid interstate highway number.')