For two positive integers $a$ and $b$, let $gcd(a, b)$ be the greatest common divisor of $a$ and $b$, that is, the largest integer that divides both $a$ and $b$ (leaving no remainder).
Let's extend the definition of gcd to a sequence $S = s_1, s_2, ..., s_k$, where $k > 2$ as follows: $gcd(S) = gcd(s_1, gcd({s_2, ..., s_{k-1}, s_k}))$. That is, gcd of a sequence is the gcd of the first element in the sequence and the gcd of the rest of the sequence.
For a sequence $S$ consisting of at least two integers, let's define a function $F(S) = |S| \times gcd(S)$, where $|S|$ is the length of the sequence.
Given an array $A$, determine what is the maximum possible value of $F(S)$ where $S$ is a subsequence of $A$ with at least two elements.
A sequence $S$ is a subsequence of an array $A$ if $S$ can be obtained from $A$ by erasing several (possibly zero or all) elements.