It was Christmas Eve and the celebrations remembering the birth of Jesus were going on in full swing at the Catheral Chapel. The Event Management Team had arranged for some exciting games after the mass worship and feast, where adults and kids of all ages participated very actively. "Chocolate Game" was organized for the kids which involved a standard chocolate of n by m pieces. More formally, chocolate is a rectangular plate consisting of n rows and m columns.
Two kids at a moment will play with the chocolate. First kid takes the chocolate and cuts it into two parts by making either a horizontal or vertical cut. Then, the second kid takes one of the available pieces and divides into two parts by either making a horizontal or vertical cut. Then the turn of first kid comes and he can pick any block of the available chocolates and do the same thing again. The player who cannot make a turn loses.
Write a program to find which of the kids will win if both of them play optimally. Output "Yes", if the kid who plays first will win, otherwise print "No".
Input Format:
The only line of the input contains two space separated integers n and m - the sizes of the chocolate.
Output Format:
Output a single line containing one word "Yes" (without quotes) if there is a sequence of moves leading to the winning of the person who moves first and "No" (without quotes) otherwise.
Refer sample input and output for formatting specifications.
Sample Input 1:
1 2
Sample Output 1:
Yes
Sample Input 2:
1 3
Sample Output 2:
No
Write a program to find which of the kids will win if both of them play optimally. Output "Yes", if the kid who plays first will win, otherwise print "No".
Input Format:
The only line of the input contains two space separated integers n and m - the sizes of the chocolate.
Output Format:
Output a single line containing one word "Yes" (without quotes) if there is a sequence of moves leading to the winning of the person who moves first and "No" (without quotes) otherwise.
Refer sample input and output for formatting specifications.
Sample Input 1:
1 2
Sample Output 1:
Yes
Sample Input 2:
1 3
Sample Output 2:
No
Solution:
a,b=input().split()
if (int(a)*int(b))%2==0:
print("Yes")
else:
print("No")
One thing I want to talk to you is thank you. Your posts help me open my mind. I find them very interesting. They ease me in the hard time. Thanks for sharing your articles.
ReplyDeleteAbcya2021
Y8y8y8 games online
Kids Kizi games
Friv Land
I got some wonderful knowledge from this post. The post is very informative and helpful also. Thanks for sharing such a post. Keep it up
ReplyDeleteSpecial Strike Operations free games!
Blue and Red Impostor games online!
Two Ball 3D Dark free games online!
https://frivland.blogspot.com/
https://jogosjogos360.blogspot.com/
https://gogy2games.blogspot.com/
Great Post!
ReplyDeleteBinance NFT Marketplace Clone |
OpenSea Clone |
Cointool App Clone |
Axie Infinity Clone |
Cryptopunks Clone |
Rarible Clone |
Great Blog Post!
ReplyDeleteCryptopunks Clone |
NBA Top Shot Clone |
OpenSea Clone |
Rarible Clone |
Axie Infinity Clone |
Zed Run Clone |
Thanks for giving so much of Information. Young Pappy, a drill rapper met his early demise on May 29, 2015.
ReplyDeletehow did young pappy die
The Token Migration platform helps projects upgrade their old tokens to new tokens. In essence, if your old token has any flaws or if you want to add some additional features, you can create an entirely new token and users can swap their old tokens with your new tokens through the migration contract.
ReplyDeleteCreate your own DEX with like Uniswap our Uniswap clone script. Get decentralized exchange development from BlockchainX experts.Uniswap clone script
ReplyDeleteThe migration platform works similarly to a DEX without the Automated Market Maker system. The New or V2 tokens are stored inside the migration smart contract and users can simply connect their web3 wallets to trustlessly migrate their tokens.Token Migration
ReplyDeleteNFT Marketplace Development Company |
ReplyDeleteSorare Clone Script
MakerDAO Clone Script
NBA Top Shot Clone Script |
Rarible Clone Script |
PancakeSwap Clone Script |
Cointool App Clone Script |
Axie Infinity Clone Script |
Zed Run Clone Script |
Solsea Clone Script |
Great work. You explain game programming very well. I'm glad that all my basics are clear after reading your blog.
ReplyDeleteWhite Label Fantasy Cricket App Development
ReplyDeleteI read a lot of blog entries and had never come across such a topic before. I truly enjoy the topic of the blogger's bucket list you chose. This is a very useful article. Nowadays, new technology in the entertainment allows individuals to unwind and enjoy their leisure time. and python is the best and easy learning programming language, The latest technology has revolutionized daily entertainment. - Also, if you need best crypto exchange development company in Mohali
, do not delay in shaking hands with LBM Blockchain Solutions.
Nice blog post
ReplyDeleteCross Chain NFT Marketplace Development Company
NFT Marketplace Development Company
Axie infinity clone script
Opensea clone script
Metaverse NFT Marketplace Development Company
Zed run clone script
Pancakeswap clone script
Rarible clone script
There are very few Best Blockchain Development Company in Mohali. Being one,LBM Blockchain Solutions makes sure you are served the best. We are the Best Blockchain Development Company in Mohali. Our company has built an inevitable reputation in the industry with years of experience.
ReplyDeleteIf you are in search of Binance Clone development company, you may end up in over priced binance clone script or end up in getting outdated source code. We at Hivelance got your back. We provide you bug-free and multi-tested binance clone script that’s absolute user-friendly. Everything you pay for developing binance clone exchange counts on us. Fully transparent pricing guaranteed. For details visit here Binance Clone Script
ReplyDeleteExcellent Blog Post!
ReplyDeleteBEP20 Token Development Company
ERC20 Token Development Company
Solana Token Development Company
Polygon Token Development Company
PancakeSwap Clone Script
NFT Music Marketplace Development Company
Hello sir
ReplyDeleteI read your blog and You Are providing very Important and Useful Information to us. Keep it up. I am also a Blogger. I write blogs On the topic of Blockchain and Crypto Exchange. I Recently wrote a blog On How To Develop Your Own Crypto Token
read The Blog and share your reviews.
Thank you
Amazing Blog Post! Thanks for sharing informative content about GameS and Development.
ReplyDeleteonline game development company
Token Development Company
ReplyDeleteBEP20 Token Development Company
Metaverse Token Development Company
Solana Token Development Company
White Paper Writing Services |
NFT Token Development Company |
ICO Software Development Services Company|
Get ready-made Uniswap Clone Script with highly secured.
ReplyDeleteRecreate the renowned blockchain-powered virtual horse racing platform, Zed Run, effortlessly with iMeta's zedrun clone script
ReplyDelete– a ready-made solution. Start your journey into the world of blockchain gaming and NFT collectibles with our customizable solution. iMeta Technologies powerful features of Zed Run Clone Script, including diverse breed types, an efficient filter mechanism, integrated wallets, multi-blockchain support for launching NFT gaming platforms, racing slots, a user-friendly roster dashboard, minting capabilities, and support for various wallets in the racing section.
This comment has been removed by the author.
ReplyDelete