#!/usr/bin/python N = int(raw_input()) if N == 2: print '0 2' exit(0) b = 1 a = N - b print a, b