God can do anything. He can even, as the Talmud says, "make an elephant pass through the eye of a needle.".
So how would He do it? Would He shrink the elephant or enlarge the eye of the needle? Neither. The elephant would remain large and the eye of the needle small. And He would pass the elephant through the eye of the needle.
Illogical? It's true. But logic is just another of His creations. He, Who created logic, is allowed to be indifferent to it.