I don't know for sure but a plug only cares about three (or four) things:
1) Thread size.. there's skinny plugs and fatter plugs. On NGK's chart you have something like B
8ES and D
Don't quote me on the thread sizes (14mm and 10mm respectively?) but the main thing is if the 164 plug is a B.... <something> and the 166 plug is a B... <something> then it will physically fit in the hole.
2) Electrode length.. Some plugs have a regular electrode and some have a projecting electrode. A regular electrode is where if you look at the plug sideways, all you can see if the metal tip of the inner electrode. If you can also see the porcelain insulation around it as well, then it's a projecting electrode plug.
If the 164 and the 166 both use a normal electrode plug, all well and good. If they both use a projecting electrode plug, all well and good.
You can fit normal electrode plug into an engine that wants a projecting electrode plug but combustion will be lumpy since the projecting nose plug makes its spark further into the combustion chamber (some engines need it). If you put projecting electrode plugs into an engine that wants normal electrode plugs, then the pistons will smack the plugs and it will all end badly. The pistons won't know the projecting electrode plug is sticking it's nose in where it shouldn't.
In NGK speak a BR8ES is a normal plug and a BP
R8ES is a projecting nose plug. Only fit projecting nose if you're sure the engine needs it.
3) Heat range.. Less crucial.. some plugs like to stay hot and other plugs like to stay cold. In a highly tuned engine, you want plugs that like to stay cold (otherwise they melt). This is called a "Hard" or a "Cold" plug. Engines that get used around town and make 20bhp like a plug that stays hot. A hot plug heats up more quickly and this keeps it working better .. and burns off soot and "richness". If it gets too holt though it will melt. This is a "Soft" or a "Hot" plug.
Most plugs are "6", "7" or "8". In NGK terms... 8 is "Cold" and 6 is "Hot"... so a 6 plug will melt before an 8. In Champion tems
6 is a "Cold" plug and "8" is a hot plug.... so it's a bit confusing. Luckily, most plugs are "7".. which NGK and Champion agree is "somewhere in between".
There's no real problem if you fit the wrong heat raunge.. +/- one number unless your car makes 400bhp any you're going to race it at Monza.
4) Resistors. Most plugs have a resistor these days (the "R" in BPR8ES). No problems fitting non-resistor plugs but your radio might whistle if it's not shielded and you have non-resistor plugs. If your 164 plugs have "R" and the the 166 doesn't need "R" plugs, you can still fit them. Having "R" plugs when you don't need them makes no difference.