Game With Numbers

Two players take turns selecting numbers from the set {1, 2, 3, 4, 5, 6, 7, 8, 9}. Each number can be selected at most once. The player who first owns three chosen numbers whose sum is exactly 15 wins. If all numbers are selected and neither player owns three numbers summing to 15, the game ends in a draw.

This is the classic Pick15 or Number Scrabble game. It is isomorphic to tic-tac-toe played on a 3x3 magic square: the eight triples of distinct numbers from 1 to 9 that sum to 15 are exactly the eight winning lines of the magic square. Both players play optimally. Since tic-tac-toe always ends in a draw with optimal play, determine whether the first player can force a win from the empty board. Return false if the game is a draw.

Examples
Input: 15
Output: false
Hints

Game With Numbers

Two players take turns selecting numbers from the set {1, 2, 3, 4, 5, 6, 7, 8, 9}. Each number can be selected at most once. The player who first owns three chosen numbers whose sum is exactly 15 wins. If all numbers are selected and neither player owns three numbers summing to 15, the game ends in a draw.