# coding: utf-8 print(1, (int(input()) - 1))