http://acm.hdu.edu.cn/showproblem.php?pid=2147
巴什博弈
// File Name: hdu2147.cpp
// Author: bo_jwolf
// Created Time: 2013年10月01日 星期二 11:37:33
#include<vector>
#include<list>
#include<map>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<ctime>
using namespace std;
int main(){
int n , m , ans ;
while( scanf( "%d%d" , &n , &m ) != EOF && ( n && m ) ){
if( (( n % 2 ) && ( m % 2 ) ) ) printf( "What a pity!\n" ) ;
else printf ( "Wonderful!\n" ) ;
}
return 0;
}