Chocolate Game |Programming_info || python_problem_12

 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 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

Solution:
a,b=input().split()
if (int(a)*int(b))%2==0:
    print("Yes")
else:
    print("No")
Share:

21 comments:

  1. 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.
    Abcya2021
    Y8y8y8 games online
    Kids Kizi games
    Friv Land

    ReplyDelete
  2. Thanks for giving so much of Information. Young Pappy, a drill rapper met his early demise on May 29, 2015.

    how did young pappy die

    ReplyDelete
  3. 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.

    ReplyDelete
  4. Create your own DEX with like Uniswap our Uniswap clone script. Get decentralized exchange development from BlockchainX experts.Uniswap clone script

    ReplyDelete
  5. The 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

    ReplyDelete
  6. Great work. You explain game programming very well. I'm glad that all my basics are clear after reading your blog.

    White Label Fantasy Cricket App Development

    ReplyDelete

  7. I 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.

    ReplyDelete
  8. 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.

    ReplyDelete
  9. If 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

    ReplyDelete
  10. Hello sir
    I 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

    ReplyDelete
  11. Amazing Blog Post! Thanks for sharing informative content about GameS and Development.
    online game development company

    ReplyDelete
  12. Recreate the renowned blockchain-powered virtual horse racing platform, Zed Run, effortlessly with iMeta's zedrun clone script
    – 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.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support