logic – Two “bubble” loops in pseudocode; would they return the same thing?

I am trying to create a new form of a bubble loop and want to see if they would return the same truth values during runtime. Could I get a second pair of eyes to confirm if this is the case?

Note: prod is equal to a target product of a sequence.

Code #1
For c = 1 to x
For d = 1 to c - 1
If (a,c * a,d = prod) return True 
End For

Code #2
For c = 1 to x
For d = c + 1 to x
If (a,c * a,d = prod) return True 
End For

I did data collection and found that in each case, the return true value would be the same. Is this always the case? If so, is this just because our index is simply starting at the second to the beginning as compared to skipping the end?