UVa 10363 - Tic Tac Toe

10363 - Tic Tac Toe

 * http://acm.uva.es/p/v103/10363.html

Summary
Determine whether a tic tac toe game is valid or not.

Explanation
There are only a few rules here: 1.number of O's must be less than the number of X's. 2.If there is 1 more X than O then there can be an tic tac toe. 3.If there is equal number of X's and O's can have a tic tac toe.

Input
2 X.O OO. XXX

O.X XX. OOO

Output
yes no