import itertools; import operator; n,m=6,3; print '\n'.join(sorted('{}={}'.format(reduced, '*'.join(map(str,fangs))) for fangs, reduced in ((fangs, reduce(operator.mul, fangs)) for fangs in itertools.combinations_with_replacement(range(10**(n/m-1), 10**(n/m)), m)) if sorted(str(reduced)) == sorted(''.join(map(str, fangs))) and map(lambda x: str(x)[-1], fangs).count('0') <= 1))
aW1wb3J0IGl0ZXJ0b29sczsgaW1wb3J0IG9wZXJhdG9yOyBuLG09NiwzOyBwcmludCAnXG4nLmpvaW4oc29ydGVkKCd7fT17fScuZm9ybWF0KHJlZHVjZWQsICcqJy5qb2luKG1hcChzdHIsZmFuZ3MpKSkgZm9yIGZhbmdzLCByZWR1Y2VkIGluICgoZmFuZ3MsIHJlZHVjZShvcGVyYXRvci5tdWwsIGZhbmdzKSkgZm9yIGZhbmdzIGluIGl0ZXJ0b29scy5jb21iaW5hdGlvbnNfd2l0aF9yZXBsYWNlbWVudChyYW5nZSgxMCoqKG4vbS0xKSwgMTAqKihuL20pKSwgbSkpIGlmIHNvcnRlZChzdHIocmVkdWNlZCkpID09IHNvcnRlZCgnJy5qb2luKG1hcChzdHIsIGZhbmdzKSkpIGFuZCBtYXAobGFtYmRhIHg6IHN0cih4KVstMV0sIGZhbmdzKS5jb3VudCgnMCcpIDw9IDEpKQ==