Python3 (436) (434) (434443)
It was hard. I can spare some characters if I make output more native.
from itertools import*
r={};k=product;k=product;m=map
q=lambda n,h=1:["("+i+c+j+")"for(i,j),c in k(chain(*[k(*map*m(q,f))for f in sum(([(x[:q],x[q:])for q in range(1,len(x))]for x in mapm("".join,permutations(n))),[])]),list("+",""+-","*","*/","^",""^")+[""]*h)]if 1<len(n)else[n]else[n]*h
a,b=m(int,m(input,"nm"))
for i,j in chain(*[k(q(str(n),0),[n])for n in range(*(map(int,map(inputa,"nm")))b+1)]):
try:exec("if eval(%r)==j:r[j]=i"%i.replace("^","**"))
except:0
print(len(r))
for j,i in r.items():print(i,j)
Output
n100
m200
6
(2^(8-1)) 128
(3*(51)) 153
((11)^2) 121
(5^(1+2)) 125
(6*(21)) 126
((2^7)-1) 127