Is the language $\{a^n b^m : 1000|nm \}$ regular? We have a language  $$ L = \{a^n b^m \mid 1000|nm \} $$
Is this language regular?
I'm trying to disprove this using the Pumping Lemma, but it didn't work.
assume I say  $x=a^{h}$ and $y=a^{t}$ and $z =a^{n-t-h}b^m$ and 1000|nm
if I say i = 0 , $L =a^{n-t}b^m$ and 1000|(n-h)*m and I can't prove (n-h)*m isn't dividable by 1000.
if I say i = 2  $L =a^{n+t}b^m$ and 1000|(n+h)*m I can't prove this too because I'm not sure about h value.
I think it didn't work. any idea?
I would appreciate it if you helped me with this.
Notice that $1000 = 2^3 5^3$. Then $1000 | nm$ iff for some $0 \le i,j \le 3$,
$n$ is multiple of $2^i 5^j$ and $m$ is a multiple of $2^{3-i} 5^{3-j}$ (notice that there are only finitely many choices for $i$ and $j$).
Then $L$ can be obtained as the union of the languages $L_{i,j} = \{a^n b^m : 2^i 5^j|n \;\mbox{ and }\; 2^{3-i} 5^{3-j}|m\}$.
Each of these languages  $L_{i,j}$ is the concatenation of $L'_{i,j} = \{ a^n : 2^i 5^j|n\}$ with $L''_{i,j} = \{b^m : 2^{3-i}5^{3-j}|m\}$.
It is easy to see that each $L'_{i,j}$ and each $L''_{i,j}$ is regular. By the closure properties of regular languages $L$ is regular.