Problem description

One way to create a task is to learn from math. You can generate some random math statement or modify some theorems to get something new and build a new task from that.

For example, there is a statement called the "Goldbach's conjecture". It says: "each even number no less than four can be expressed as the sum of two primes". Let's modify it. How about a statement like that: "each integer no less than 12 can be expressed as the sum of two composite numbers." Not like the Goldbach's conjecture, I can prove this theorem.

You are given an integer n no less than 12, express it as a sum of two composite numbers.

Input

The only line contains an integer n (12 ≤ n ≤ 106).

Output

Output two composite integers x and y (1 < x, y < n) such that x + y = n. If there are multiple solutions, you can output any of them.

Examples

Input

12
15
23
1000000

Output

4 8
6 9
8 15
500000 500000

Note

In the first example, 12 = 4 + 8 and both 4, 8 are composite numbers. You can output "6 6" or "8 4" as well.

In the second example, 15 = 6 + 9. Note that you can't output "1 14" because 1 is not a composite number.

解题思路:每个不小于12的整数可以表示为两个合成数之和,若满足条件有多组,则输出其中的一组,简单判断即可。

AC代码:

 #include<bits/stdc++.h>
using namespace std;
bool isprime(int x){
for(int i=;i*i<=x;++i)
if(x%i==)return false;
return true;
}
int main(){
int n;cin>>n;
for(int i=;;i+=)
if(!isprime(n-i)){cout<<i<<' '<<(n-i)<<endl;break;}
return ;
}

最新文章

  1. 查询java 类加载的路径
  2. Dijkstra搜索算法
  3. PHP学习第一天笔记——php的基本语法
  4. Effective Java Index
  5. S3C2440 裸机程序之音频
  6. step by step 之餐饮管理系统四(日志模块实现)
  7. spring boot学习
  8. UITextView的字数限制 及 添加自定义PlaceHolder
  9. User_Agent_List 浏览器信息列表
  10. 通过点击取消按钮关闭dialog窗口
  11. [算法导论]贪心算法(greedy algorithm)
  12. C# 静态类与非静态类、静态成员的区别分析
  13. ES6笔记① var 和 let的区别
  14. 四核网络机顶盒芯片局势分析(开放市场):rk3128将会成为四核主流
  15. 17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制对于新的Master和Slaves:
  16. Javascript多线程引擎(五)
  17. 开源一个上架 App Store 的相机 App
  18. 一个比Spring Boot快44倍的Java框架!
  19. php算法题2
  20. 好用的 over the wall教程

热门文章

  1. python tips:描述符descriptor
  2. sysbench使用指南
  3. Spring Web MVC常用配置汇总
  4. 33.bucket与metric核心概念讲解
  5. 68.document增删改原理
  6. kafka监控工具kafka-manager
  7. TLE - Time Limit Exceeded
  8. 请问spfa+stack 和spfa+queue 是什么原理
  9. toj 1421
  10. [poj3735] Training little cats_矩乘快速幂