If I'm understanding you correctly, this is a simple division problem. You have 13983816 possible combinations (correct), 49 of which are listed in each table. So you need tables.

I suspect that you actually mean something a bit different from that, but it's not clear exactly what. Can you state the problem more precisely?