Hasan and Hussain are playing a game with W × H paper, the game consist of turns; Hasan starts first. On each turn, the player chooses one of the pieces of paper and cuts it into two papers such that the cut must be a straight line parallel to one of the paper sides and must cut the paper to two pieces of paper with integer dimensions.

The loser is the one who can't make a move (i.e when all pieces of paper become 1 × 1). Assuming that Hasan and Hussain are playing optimally, who will win the game?

Input

The first line of input is an integer T(1 ≤ T ≤ 101) which represents the number of test cases. Each of the next T lines consists of two space-separated integers W,H (1 ≤ W,H ≤ 100,000) the width and the height of the paper.

Output

For each test case, output a single line representing its answer; if Hasan is the winner output "Hasan" (without quotes) otherwise "Hussain" (without quotes).

Examples

Input

3
1 1
2 1
2 2

Output

Hussain
Hasan
Hasan

AC代码(切n个方块的纸片需要n-1次)

#include <iostream>
#include <bits/stdc++.h>
using namespace std;int main()
{int t, x, y;while(scanf("%d",&t)!=EOF){while(t--){scanf("%d%d",&x,&y);long long int sm = x*y;if((sm-1)%2==0)printf("Hussain\n");elseprintf("Hasan\n");}}return 0;
}

Paper Game相关推荐

  1. CVPR 2011 全部论文标题和摘要

    CVPR 2011 Tian, Yuandong; Narasimhan, Srinivasa G.; , ■Rectification and 3D reconstruction of curved ...

  2. 别光发Paper,搞点实际问题

    文 / LVS 话说几个月前,我参加了一场学术大会,台上的教授不是北大.清华就是浙大.上交大,几位教授不约而同的吐槽招通信.算法和编解码的学生太难了.为什么呢?原来,先不比金融,仅仅与同是IT领域的A ...

  3. 网友们票选的2018 Best Paper,你pick谁?

    整理 | 琥珀 出品 | AI科技大本营 不久前,Reddit 机器学习论坛上一位网友发布了一个帖子: "What is the best ML paper you read in 2018 ...

  4. 顶会paper越来越多,我该怎么看?

    视学算法转载 作者:王晋东 顶会论文越来越多,如何阅读?中国科学院大学计算机应用技术博士王晋东给出了一些建议. 近年来,作为学术前沿研究的风向标的顶会接收的论文越来越多.例如,最近放榜的 NeurIP ...

  5. 干货 | 你的Paper阅读能力合格了吗(硕士生版)

    作者&编辑:李中梁 前言 论文阅读一直是科研过程中至关重要的一环,如何收集论文,快速选取和课题匹配的论文,高效地把握论文核心思想是每个科研人员的必备素养,也是每个科研萌新(硕士研究生)苦恼的问 ...

  6. 被拒稿、被否定:读博五年间都没有发 paper 是一种怎样的体验?

    作者:少十七 https://www.zhihu.com/question/59323074/answer/1162785605 来源:知乎 著作权归作者所有.商业转载请联系作者获得授权,非商业转载请 ...

  7. 生活有时会有点苦涩——一位第六年还没发paper的PHD的自述

    公众号关注 "视学算法" 设为 "星标",DLCV消息即可送达! 来自 | 知乎 作者丨少十七 来源丨https://www.zhihu.com/questio ...

  8. CV领域最经典的Paper是什么来头?

    最近后台有很多准研究生粉丝给我留言,重复频次最高的2个主题是: ① 如何高效地筛选.阅读论文? ② 如何高效复现论文? AI领域学术会议动辄上千篇文章,无论是准研究生还是现研究生,都会碰到这个问题. ...

  9. 干货|你的Paper阅读能力合格了吗(硕士生版)

    点击上方"小白学视觉",选择加"星标"或"置顶" 重磅干货,第一时间送达 本文转自|机器学习算法工程师 前言 论文阅读一直是科研过程中至关重 ...

  10. 2021年度训练联盟热身训练赛第四场 H - Rock Paper Scissors(字符串匹配,FFT)

    整理的算法模板合集: ACM模板 点我看算法全家桶系列!!! 实际上是一个全新的精炼模板整合计划 2021年度训练联盟热身训练赛第四场 H - Rock Paper Scissors(字符串匹配,FF ...

最新文章

  1. 使用spring + ActiveMQ 总结
  2. Android Input系统之触摸屏
  3. iOS 9: UIStackView入门
  4. 如果连接远程的mysql数据库连不上,可用下面的方法试下
  5. Win 驱动编程 - 内核里操作注册表
  6. java注解大全_java开发注解大全
  7. 在腾讯云上安装mysql遇到的问题
  8. 错误:ORA-28002: the password will expire within 7 da
  9. CVE-2015-1635(MS15-034)-HTTP.sys远程代码执行复现
  10. Spring Boot Server容器配置
  11. HDU Problem 4857 逃生【拓扑排序+优先队列】
  12. Android播放器框架分析之AwesomePlaye
  13. 都说“先卖人,后卖货”,或者说要想卖货,先卖人
  14. android webview 弹出浏览器,android – 防止WebView打开浏览器
  15. Tensorflow官方文档学习理解 (五)-卷积MNIST
  16. 谷歌电子市场学习笔记第一天之上
  17. oracle winxsx 目录,Mac迅雷瘦身精简教程
  18. Java 图标logo的由来
  19. 占星术杀人魔法 - 笔记
  20. Canny算子中的梯度求取及非最大值抑制(NMS)实现

热门文章

  1. 研读网络安全法律法规,提升技术管理者 “法” 商
  2. fl studio 21打不开,FL工程文件也打不开怎么办?
  3. Irene Tong的空间
  4. 连接被重置(域名被墙)
  5. python脚本备份Cisco Firepower 2130
  6. 自制空气质量检测设备
  7. 永劫无间创建桌面快捷方式,并添加到steam库里
  8. Landsat5数据下载中国地区1987年
  9. 微软常用运行库合集,电脑必备组件
  10. plc的毕业设计冷门题目_PLC毕业设计题目