Is the word coprime? Given a word, treat every letter as it's number in English alphabet (so a becomes 1, b becomes 2, z becomes 26 and so on), and check if all of them, including duplicates, are pairwise coprime.

The input is exactly one word of lowercase English letters. The output is the fact if the word is coprime: any truthy/falsey values, but only two variants of them. Standard loopholes are forbidden.

Test cases:


man: True
day: True (thanks to Ørjan Johansen)
led: False (l=12 and d=4 have gcd=4)
mana: True (though a occurs multiple times, 1 and 1 are coprimes)
mom: False (gcd(13,13)=13))
of: False (thanks to xnor; though 15∤6, gcd(15,6)=3)
a: True (if no pairs of letters, treat the word as coprime too)


This is a code-golf, so the shortest code in bytes wins!
Wolfram Language (Mathematica), 36 bytes

CoprimeQ@@LetterNumber@Characters@#&amp;


Try it online!



Wolfram Language (Mathematica), 33 bytes


Thanks to Misha Lavrov for this three bytes shorter version.


CoprimeQ@@(ToCharacterCode@#-96)&

Try it online!