#!/usr/bin/python3 import sys, re for line in sys.stdin: if (re.search(r'(^(?!555)((\d{3})-(\d{3})-(\d{3})$))|((\d{3}) (\d{3}) (\d{3})$)', line)): print('true') else: print('false')