input: Write a python function for a game involving two players, Alice and Bob, playing on a circular field with flowers. Alice and Bob take turns picking flowers either clockwise or anti-clockwise. If one player picks the last flower, they win. Given two integers, n and m, representing the maximum number of flowers in the clockwise and anti-clockwise directions, respectively, calculate the number of pairs (x, y) such that Alice always wins. The constraints are 1 <= n, m <= 10^5. Return the total number of possible pairs.
output: def count_alice_wins(n, m):
      def gcd(a, b):
          while b:
              a, b = b, a % b
          return a
  
      return (n - 1)*(m - 1)//2 - ((n - 1)*(m - 1)//gcd(n, m) - gcd(n, m))//2