{"raw_statement":[{"iden":"statement","content":"Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned that a fraction is called _proper_ iff its numerator is smaller than its denominator (_a_ < _b_) and that the fraction is called _irreducible_ if its numerator and its denominator are coprime (they do not have positive common divisors except 1).\n\nDuring his free time, Petya thinks about proper irreducible fractions and converts them to decimals using the calculator. One day he mistakenly pressed addition button ( + ) instead of division button (÷) and got sum of numerator and denominator that was equal to _n_ instead of the expected decimal notation.\n\nPetya wanted to restore the original fraction, but soon he realized that it might not be done uniquely. That's why he decided to determine maximum possible proper irreducible fraction such that sum of its numerator and denominator equals _n_. Help Petya deal with this problem."},{"iden":"input","content":"In the only line of input there is an integer _n_ (3 ≤ _n_ ≤ 1000), the sum of numerator and denominator of the fraction."},{"iden":"output","content":"Output two space-separated positive integers _a_ and _b_, numerator and denominator of the maximum possible proper irreducible fraction satisfying the given sum."},{"iden":"examples","content":"Input\n\n3\n\nOutput\n\n1 2\n\nInput\n\n4\n\nOutput\n\n1 3\n\nInput\n\n12\n\nOutput\n\n5 7"}],"translated_statement":[{"iden":"statement","content":"Petya 非常热爱数学，尤其是与分数相关的部分。最近他了解到，一个分数被称为 _真分数_ 当且仅当其分子小于分母（#cf_span[a < b]），并且当分子与分母互质（它们除了 #cf_span[1] 外没有正的公因数）时，该分数被称为 _最简分数_。\n\n在空闲时间，Petya 思考真最简分数，并使用计算器将它们转换为小数。一天，他错误地按下了加法按钮（#cf_span[ + ]）而不是除法按钮（#cf_span[÷]），得到了分子与分母的和等于 #cf_span[n]，而不是预期的小数表示。\n\nPetya 希望还原原始的分数，但很快他意识到这可能不是唯一的。因此，他决定找出满足分子与分母之和等于 #cf_span[n] 的最大可能的真最简分数。请帮助 Petya 解决这个问题。\n\n \n\n输入中仅有一行包含一个整数 #cf_span[n]（#cf_span[3 ≤ n ≤ 1000]），即分数的分子与分母之和。\n\n请输出两个用空格分隔的正整数 #cf_span[a] 和 #cf_span[b]，表示满足给定和的最大可能的真最简分数的分子和分母。"},{"iden":"input","content":"在输入的唯一一行中给出一个整数 #cf_span[n]（#cf_span[3 ≤ n ≤ 1000]），即分数的分子与分母之和。"},{"iden":"output","content":"请输出两个用空格分隔的正整数 #cf_span[a] 和 #cf_span[b]，表示满足给定和的最大可能的真最简分数的分子和分母。"},{"iden":"examples","content":"输入3输出1 2输入4输出1 3输入12输出5 7"}],"sample_group":[],"show_order":[],"formal_statement":"Given:  \n- Integer $ n $, where $ 3 \\leq n \\leq 1000 $.  \n- Find positive integers $ a, b $ such that:  \n  1. $ a + b = n $,  \n  2. $ a < b $ (proper fraction),  \n  3. $ \\gcd(a, b) = 1 $ (irreducible),  \n  4. $ \\frac{a}{b} $ is maximized.  \n\nObjective:  \nMaximize $ \\frac{a}{b} $ subject to the above constraints.  \n\nSince $ a + b = n $, we have $ b = n - a $, so $ \\frac{a}{b} = \\frac{a}{n - a} $.  \nTo maximize $ \\frac{a}{n - a} $, we maximize $ a $ under the constraints:  \n- $ a < n - a \\Rightarrow a < \\frac{n}{2} $,  \n- $ \\gcd(a, n - a) = 1 \\Rightarrow \\gcd(a, n) = 1 $ (since $ \\gcd(a, n - a) = \\gcd(a, n) $).  \n\nThus, find the largest integer $ a < \\frac{n}{2} $ such that $ \\gcd(a, n) = 1 $.  \nThen set $ b = n - a $.  \n\nOutput: $ a $ and $ b $.","simple_statement":null,"has_page_source":false}