Two players are playing a game where they are given an array of integers (A[i]<=10^6) .Each player can choose a number from the array and separate it as x,y where x*y=A[i] and put these numbers back in the array.A player loses if he cannot make any move.Also we cannot represent a number as 1*Number.My doubt here is how can I find the most optimal way of playing like I had some of the ways of separating a number like 1. Prime*Composite 2.Composite*Composite 3.Prime*Prime.But how do I determine the winning/Losing state ?



