((a^(m+n))/(a^n))^m = ((a^m)(a^n)/(a^n))^m = (a^m)^m = a^(m^2)
(a^(n-m))/(a^n))^(m-n) = ((a^n)(a^-m)/(a^n))^(m-n) = (a^-m)^(m-n) = a^(-m^2+mn)
Product of those two = a^(m^2-m^2+mn) = a^(mn)
(a^(n-m))/(a^n))^(m-n) = ((a^n)(a^-m)/(a^n))^(m-n) = (a^-m)^(m-n) = a^(-m^2+mn)
Product of those two = a^(m^2-m^2+mn) = a^(mn)