A. Watermelon
time limit per test

1 second

memory limit per test

64 megabytes

input

standard input

output

standard output

One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w kilos. They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.

Pete and Billy are great fans of even numbers, that's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos, at the same time it is not obligatory that the parts are equal. The boys are extremely tired and want to start their meal as soon as possible, that's why you should help them and find out, if they can divide the watermelon in the way they want. For sure, each of them should get a part of positive weight.

Input

The first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.

Output

Print YES, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and NO in the opposite case.

  1. Input
    8
  1. Output
  1. YES
Note

For example, the boys can divide the watermelon into two parts of 2 and 6 kilos respectively (another variant — two parts of 4 and 4 kilos).

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

题意:分开的两部分都是正偶数输出YES,否则输出NO

         分析:两部分不一定相等
         代码如下:
  1. #include<iostream>
  2. #include<cstdio>
  3. using namespace std;
  4. int main()
  5. {
  6. int w;
  7. cin>>w;
  8.  
  9. if(w%==&&w!=)
  10. {
  11. cout<<"Yes"<<endl;
  12. }
  13. else
  14. {
  15. cout<<"No"<<endl;
  16. }
  17. return ;
  18. }

Codeforces - Watermelon的更多相关文章

  1. Watermelon -- codeforces

    http://acm.hust.edu.cn/vjudge/contest/view.action?cid=93241#problem/A  (654123) http://codeforces.co ...

  2. Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon 水题

    A. Watermelon 题目连接: http://www.codeforces.com/contest/4/problem/A Description One hot summer day Pet ...

  3. codeforces水题100道 第二题 Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon (math)

    题目链接:http://www.codeforces.com/problemset/problem/4/A题意:一个整数能否表示成两个正偶数的和.C++代码: #include <cstdio& ...

  4. Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon【暴力/数学/只有偶数才能分解为两个偶数】

    time limit per test 1 second memory limit per test 64 megabytes input standard input output standard ...

  5. Codeforces - A. Watermelon

    A. Watermelon time limit per test 1 second memory limit per test 64 megabytes input standard input o ...

  6. CodeForces 4A

    A A - Water~melon Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit St ...

  7. Codeforces初体验

    Codeforces印象 这两天抽时间去codeforces体验了一把. 首先,果然有众多大牛存在.非常多名人一直參加每周一次的比赛.积分2000+,并參与出题. 另外.上面题目非常多.预计至少一千题 ...

  8. python爬虫学习(5) —— 扒一下codeforces题面

    上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...

  9. 【Codeforces 738D】Sea Battle(贪心)

    http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...

随机推荐

  1. 2019-分享数百个 HT 工业互联网 2D 3D 可视化应用案例分享

    继<分享数百个 HT 工业互联网 2D 3D 可视化应用案例>2018 篇,图扑软件定义 2018 为国内工业互联网可视化的元年后,2019 年里我们与各行业客户进行了更深度合作,拓展了H ...

  2. Maven pom.xml 添加本地jar包依赖以及打包方法

    Maven项目打包时,如果遇到需要添加本地jar包依赖的时候,可以选择两种方法: 1. 安装到本地仓库 第一种方法比较常规,适用于需要添加的jar包也是由maven项目导出,含有pom文件的时候.只需 ...

  3. 取url地址参数

    let url = 'https://i-beta.cnblogs.com/posts/edit?param1=123&param2=second'let arr = url.split('& ...

  4. Spark入门(一)--用Spark-Shell初尝Spark滋味

    Spark-Shell的使用 执行scala命令的spark-shell 进入spark的sbin目录,打开键入 ./spark-shell 即可进入spark-shell的目录 spark-shel ...

  5. yarn安装Electron提示安装正常却实际没有安装的解决

    起因 使用Quasar框架开发Electron软件,配置好后发现electron没有正常安装,但是yarn却一本正经的胡说八道:不不不,electron已经在那里了.打开模块安装目录一看还真有elec ...

  6. go例子(一) 使用go语言实现linux内核中的list_head

    package list 代码 package list import ( "fmt" ) // 数据接口 type ElemType interface{} // 节点 type ...

  7. 【Weiss】【第03章】练习3.12:单链表倒置

    [练习3.12] a.编写一个非递归过程以O(N)时间反转单链表. b.使用常数附加空间编写一个过程以O(N)时间反转单链表. Answer: 这题的b貌似没啥意义,在a小题里直接用头插法,不断地将头 ...

  8. 在MacOS上利用docker构建buildroot

    之前有听说过docker,但是一直没有使用过.最近终于下定决定使用了一下docker,感觉docker用于跨操作系统的软件工具使用还是比较友好的. 适用人群 本文忽略的部分Linux软件包安装的过程, ...

  9. Linux下安装Python3.4

    PS:如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境, 比如yum!!!!! 不要动现有的python2环境! 1. ...

  10. python报错:ERROR: No matching distribution found for dns.resolver

    可能有的小伙伴在安装dns.resolver的时候会遇到这个问题: 我百度的时候别人是: pip install dns-python 但是我这样安装也还是错误.有些时候是这个包改名了所以你没有搜索到 ...