题目描述

Snuke is giving cookies to his three goats.
He has two cookie tins. One contains A cookies, and the other contains B cookies. He can thus give A cookies, B cookies or A+B cookies to his goats (he cannot open the tins).
Your task is to determine whether Snuke can give cookies to his three goats so that each of them can have the same number of cookies.

Constraints
1≤A,B≤100
Both A and B are integers.

输入

Input is given from Standard Input in the following format:
A B

输出

If it is possible to give cookies so that each of the three goats can have the same number of cookies, print Possible; otherwise, print Impossible.

样例输入

4 5

样例输出

Possible

#include <iostream>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#define range(i,a,b) for(int i=a;i<=b;++i)
#define rerange(i,a,b) for(int i=a;i>=b;--i)
#define fill(arr,tmp) memset(arr,tmp,sizeof(arr))
using namespace std;
int n,m;
void init(){
cin>>n>>m;
}
void solve(){
cout<<((!(n%)||!(m%)||!((m+n)%))?"Possible":"Impossible")<<endl;
}
int main() {
init();
solve();
return ;
}

最新文章

  1. 【小错误】ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
  2. 无法删除服务器 &#39;old_server_name&#39;,因为该服务器用作复制过程中的发布服务器。 (Microsoft SQL Server,错误: 20582)
  3. PHPSTORM支持dwt文件设置方法
  4. 2.每人自己建立一个HelloWorld项目,练习使用git的add/commit/push/pull/fetch/clone等基本命令。比较项目的新旧版本的差别。答题人:张立鹏
  5. 前端自动化神器LiveReload配合浏览器和less/sass使用方法
  6. JQuery时间轴timeline插件的学习-Lateral On-Scroll Sliding with jQuery+technotarek / timeliner
  7. (旧)子数涵数&#183;PS——替换颜色
  8. 两个一样的tomcat不能同时启动解决方法
  9. Python pass 语句使用示例
  10. Grunt 构建SeaJS
  11. Android核心组件 Service
  12. 智传播客hadoop视频学习笔记(共2天)
  13. 浅谈.Net和Java互相调用的三种方式
  14. Leetcode 实施细节 Rotate Image
  15. 使用canvas进行图片裁剪简单功能
  16. Linux:PS命令详解与使用
  17. Android群英传笔记——第八章:Activity与Activity调用栈分析
  18. 设计模式之策略模式(Strategy Pattern)
  19. 微信小程序下拉刷新和上拉加载的实现
  20. 全排列筛选(java)

热门文章

  1. spark测试几个hadoop的典型例子
  2. 命令java 找不到或无法加载主类
  3. Android Kotlin适用小函数
  4. 13,scrapy框架的日志等级和请求传参
  5. IOS开发---菜鸟学习之路--(二十二)-近期感想以及我的IOS学习之路
  6. 如何部署安装软件:vs2010 &#39;VS&#39; Inno Setup
  7. github&#160;readme.md&#160;添加图片
  8. Android App程序结构
  9. 集训队日常训练20181117 DIV2
  10. Linux系统——常见的系统调用