input: Write a python function that simulates a game played on a circular field where Alice and Bob take turns picking flowers in either clockwise or anti-clockwise directions. Alice moves first. Given two integers n and m, represent the number of flowers in clockwise and anti-clockwise directions respectively. Calculate the number of flower pairs (x, y) such that Alice wins the game under defined rules. The range for x (clockwise) is [1, n] and for y (anti-clockwise) is [1, m]. Return the count of such pairs.
  
  Examples:
  >>> n = 3, m = 2
  3
  >>> n = 1, m = 1
  0
  
  Constraints:
  1 <= n, m <= 10^5
output: def count_flower_pairs(n, m):
      def gcd(a, b):
          while b:
              a, b = b, a % b
          return a
  
      return (n - gcd(n, m)) * (m - gcd(n, m))