[Question]
  [
When writing a message with fridge magnets, you'll often find yourself substituting a `1` for an `I`. In this challenge, your goal is to find out if a message can be written using the letters of another message. The allowed substitutions are:
```
A = 4
B = 8
C = U
E = M = W = 3
G = 6 = 9
I = 1
L = 7
N = Z
O = 0
R = 2
S = 5
```
For example, the message `CIRCA 333` can be rearranged to spell `ICE CREAM`, where the first two `3`s are rotated 180 degrees to make two `E`s, and the last `3` is rotated 90 degrees counterclockwise to make an `M`. Whitespaces can be included in the messages, but they should not be accounted for in your solution, as they're made by placing the magnets on the fridge. 
## Input
Two strings (or character arrays). All messages will match `^[A-Z0-9 ]+$`
## Output
Truthy if the two input strings are valid rearrangements of each other, falsey otherwise.
## Examples
```
["CIRCA 333", "ICE CREAM"] => true
["DCLV 00133", "I LOVE CODE"] => true
["WE ARE EMISSARIES", "33   423    3315542135"] => true
["WE WANT ICE CREAM", "MET CIRCA 334 MEN"] => true
["I HAVE ICE CREAM", "HAVE 2 ICE CREAMS"] => false
```
## More thruthy examples
These are all the 15+ letter words that map to another word. Some are trivial substitutions, but I included all that I found.
```
["ANTHROPOMORPHISE","ANTHROPOMORPHISM"]
["ANTIPHILOSOPHIES","ANTIPHILOSOPHISM"]
["CIRCUMSTANTIALLY","ULTRAMASCULINITY"]
["DECENTRALIZATION","DENEUTRALIZATION"]
["DIMETHYLNITROSAMINE","THREEDIMENSIONALITY"]
["INSTITUTIONALISE","INSTITUTIONALISM"]
["INTERCRYSTALLINE","INTERCRYSTALLIZE"]
["INTERNATIONALISE","INTERNATIONALISM"]
["OVERCENTRALIZATION","OVERNEUTRALIZATION"]
["OVERCENTRALIZING","OVERNEUTRALIZING"]
["PREMILLENNIALISE","PREMILLENNIALISM"]
["TRANSCENDENTALIZE","TRANSCENDENTALIZM"]
```
As this is a code golf challenge, the shortest solution wins! I will accept the shortest solution in 7 days from posting. Happy golfing!
[Sample solution, non-golfed](https://tio.run/##bZNda6NAFIav4684681EKsHPfBSyYO1sK8QEtG2gIsWkk63UGNEJ7LLsb8/OqNHZNDfiPO9z5ujRKX7Tj0Nunk7pvjiUFCpapvlPSaqOmwrm8Ce7jbIYdocSMkjzNh4l1TZN345FQcptUpEbpOmGadnjyXSG/ta1EXJQPEqYkb8PkYWUlloCdRht8Z2Ap508FehdL7sCfu7kZ4G6vYwZJr8oxxHykQpozS8mis@Fvmjga8b6yx74wjCvd8HcaJUHURnzdNbXj8Xw4SKcfQnHwr6e8N56Nw1doF4/jYWAJ508Eeiil5cCfu3kV4Eue3klYK2TNYGuejkQsNHJhkCDXg4FbHeyLdCQy@9kB9sPsv184wJN6ZGmh3yYqLBRbqVBwv7mZFSSIku2ZIiAj5GVDTaMb67wdAcZYeUKfJvXd/Uug5LQY5nDjySriDSozwWhlJT8cCRc4Kiqjwp/zCaMecB3rINNvbpoXPG2KuhKk5Uk@ZTOzZg5Z6kkFezw0aEi7VlpFMmuF7gOmKYpqyB7LgY3wI4vxypE8r27eAFN09sQFqsXlq/ucROvMTgBBux7YegEHg65ZZoAYBn8ynbVbdsydNPuCtbO8gn6NqzAx09wfggLfLxsXA8eHdbtP7UmRs9COY4lPqs9qeqp7NlUmvdDEYKbmkdazO6Q2q31eh3D/Dub1ZWP3RapZ1tRpNPpHw "Python 3 – Try It Online")
## Related
* [My daughter's alphabet](https://codegolf.stackexchange.com/questions/25625/my-daughters-alphabet "My daughter's alphabet")
* [Foam bath letters](https://codegolf.stackexchange.com/questions/151083/foam-bath-letters "Foam bath letters")
**EDIT**: Made an error in the substitutions, had `G = 6` and `6 = 9` as separate substitutions, merged them into one.
  
[Answer]
# [Python 2](https://docs.python.org/2/), ~~145~~ ~~131~~ ~~130~~ ~~129~~ 125 bytes
```
lambda*a:all(len({sum(map(w.count,x))for w in a})<2for x in'A4 B8 CU EMW3 G69 I1 L7 NZ O0 R2 S5'.split()+list('DFHJKPQTVXY'))
```
[Try it online!](https://tio.run/##XY5LT4NAFIX3/ooTNsxo0wADvqKLEUZL5aGAoMYNPogkvFJoWmP87QhGbXVzk3PyfTm3eete60rrs9OHvkjLx@d0Nz1Oi4IULxV5b5clKdOGrKZP9bLqJmtKs3qBFfIK6Qc90ca0HpLMdZwdwryBcBOGi/0j2CqcA3j38BUEGkJDnrZNkXeE7hV52xHZOp/NL6@uo/j2Tqa0bxZ51SEjkmkHJgdjTJpAsk0BMxDclejOL2GZTgxFUb8ROH48UL4ltqFEgAdi@McOQx7YIhxZxgDo2niHBdUwdE1lxj8t4V6EzfCguSLCz1s6XOFtGzZmfNj/I3w12qYLJdp/Ag "Python 2 – Try It Online")
Alt:
# [Python 2](https://docs.python.org/2/), 125 bytes
```
lambda*a:len({(x,sum(map(w.count,x)))for x in'A4 B8 CU EMW3 G69 I1 L7 NZ O0 R2 S5'.split()+list('DFHJKPQTVXY')for w in a})<23
```
[Try it online!](https://tio.run/##XY5LT4NAFIX3/ooTNswoaYABX9HFCKNFeSggqHGDDyIJUFJoijH@dqSN2urmLk6@75zbvHdvs1of8tPHocyqp5dsNzsuX2vyQXqlXVSkyhqynDzPFnWn9JTSfDZHj6KWuYGzQ1i3EF7KcLF/BEeDewD/AYGKUEdkypO2KYuO0L2yaDsi2@fTy6vrmzi5u5fXRcuxCNknPdHZ0MyLukNOJMsJLQ7GmKRAciwBKxTck@jOL2FbbgJV1b4RuEEyUoEttqFUgIdi/M6JIh46IlqxjAEw9NUdFzTTNHSNmf@0lPsxNsOj5okYP28Z8IS/bTiY8nH/j7BO9E0WSXT4Ag "Python 2 – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~99~~ ~~72~~ 71 bytes
```
->a{!!a.map{|x|x.tr("0-9UZMW","OIREASGLBGCNE").chars.sort-[" "]}.uniq!}
```
[Try it online!](https://tio.run/##VY4xT8MwFIR3fsXLm0BKrCROBgaQjGsVS3EixaWRsDyYiqoMQElTqSjJbw8uBSqWN9x39@7a/dPntL6ZolvXB4Ejr27bD4fhQLr2EuPo@uFRNRhiJWvB9Ly4m/NS4BVZbVy7I7v3tosMAtqR7N9ePoJxMga5rDkDSimGgJIL4D6r0IYXBme8WEIcJz8QimrpeTUTJ9wIYLUAoaTWrJZCH12UAkCWHq//muR5liY0/ws0rFzAucYHlFjA74gMlChPXgn3zLf9s34r6VnTaC15dqtNP3QDbGFtOjtOXw "Ruby – Try It Online")
Takes an array of strings, assumes input in uppercase as in all test cases.
-1 byte golfed by benj2240.
[Answer]
# JavaScript (ES6), ~~102~~ 100 bytes
Takes input as two arrays of characters in currying syntax `(a)(b)`. Returns a boolean.
```
a=>b=>(g=s=>s.map(c=>'648UD3F6H1JK73Z0PQ25TUV3'[parseInt(c,36)-9]||c).sort().join``.trim())(a)==g(b)
```
[Try it online!](https://tio.run/##jY/BboJAFEX3/YoXN84kdQQGbLsYEoLTOK1oC4hJjYkjBaJRIAztyn@ntMbWpE3s5i3uzTm5byvfpYqrTVn38uI1aVLWSGavmY0yppityF6WKGZ2d2Dezob0fjDSHx5v6Iv29GxY4Syi3UUpK5WIvEbxNR3g3t3ycIgxUUVVI0y2xSZfrUhdbfYIYyQxYxla4yYuclXsErIrMpSiBSGk4wrfdYBS2lniYyJcDq7PHa9NMPT7UFdvydUf6NAdR6Bp@jkL42nU4tMhv0TPOTg@B@6JIHB8wYNvCaUAYBqftx2mW5Zp6NT6h2/uTEI4n39sPB7C6U0TPD65pBIwctovfpu@YuOnCE6mVO5U0nwA "JavaScript (Node.js) – Try It Online")
### How?
Using the helper function **g()**, for each input **s**:
* Digits **0** to **8** and letters **X**, **Y** and **Z** are left unchanged. Everything else is explicitly translated.
```
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
         ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
.........648UD3F6H1JK73Z0PQ25TUV3...
```
Code:
```
s.map(c => '648UD3F6H1JK73Z0PQ25TUV3'[parseInt(c, 36) - 9] || c)
```
* We sort the characters (which brings all spaces at the beginning), join them and remove all leading whitespace.
Code:
```
.sort().join``.trim()
```
Finally, we compare both outputs.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 42 bytes
```
T` dUZMW`_\OIR\EASG\LBGCN\E
%O`.
^(.*)¶\1$
```
[Try it online!](https://tio.run/##VY1NCsIwFIT3PcUjWKhSStO0B4jpowaaFpLaggSNoAs3LsSzeQAvVlN/KG5mMd/HzO18v1yPYxgZF4@dg9N2pwZ3sK3UFrmpbL2uRGMxCFuXBPsoWS2fD0sX40iE1IIDY4zEQKRAEBq5IgEpRd1DmtIvgbrtPWxL9GxA4BoBlTSGa4lmUhgDgDyb0u/RosgzyoqPPfCmg3nd2wo7@H3noLDxooQN9yd/3rvJ5s6QFw "Retina 0.8.2 – Try It Online") Takes input on separate lines, but Link includes test cases and header. Explanation:
```
T` dUZMW`_\OIR\EASG\LBGCN\E
```
Map all the letters to a minimal set, deleting the spaces.
```
%O`.
```
Sort each string into order.
```
^(.*)¶\1$
```
Compare the two values.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 49 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?")[SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set")
-1 thanks to ngn.
Anonymous tacit prefix function.
```
(≡/(⍋⌷¨⊂)¨)(,¨⎕D,'UMWZ ')⎕R('OIREASGLBGCEEN',⊂⍬)
```
[Try it online!](https://tio.run/##bY7BSsNAEIbvPsWQyyaQYpNNHmDdDO1KNgu7aQMWDwWpl4JevSoUrKbowQfw1oPg0XseZV8kTkWpFi/DzPB9M//8ejm4uJkvry77PvT3r8ehbx/840e39evbqNtGYUzt5qWI2UQ3Z8AiGmzIjLIo3Kg8GUnEisVE@/Yt6hd@9eTbDUHK@PVd98796pkmZyXVeqxcvwDqTp2p2CyQykoBnPMghkBJBElndXDOjn5ThSynMBwm3xiUZkqkKfAQbBCERUCtnBNWodvxnANAlu4qfUryPEsTnv@jNqKqYR@CVI01/ETMQGN1aCkYC8ryR/rapPudI@kT "APL (Dyalog Unicode) – Try It Online")
`⎕R` PCRE **R**eplace:  
 `'UMWZ '` these five characters  
 `⎕D,` preceded by the digits  
 `,¨` separately (make each into a string rather than being a single character)  
 with:  
 `⊂⍬` nothing  
 `'OIREASGLBGCEEN',` preceded by these characters
`(`…`)` apply the following tacit function to that:
 `(`…`)¨` apply the following tacit function to each:
  `⊂` enclose it (to treat it as a whole)
  `⍋⌷¨` use each of the indices that would sort it to index into the whole string (sorts)
 `≡/` are they identical? (lit. match reduction)
[Answer]
# [Python 2](https://docs.python.org/2/), 108 bytes
```
lambda a,b:g(a)==g(b)
g=lambda s:sorted('85930A4614012B3C4D5EF6378GH9AI2J3KL7'[int(c,36)]for c in s if'!'<c)
```
[Try it online!](https://tio.run/##VY9Bb4IwGIbP81d864U24QC0oJKxpCvdZANNwOjBeQAcjGQDA1z89awQjdnlS/O8T7633/nSfze1NRTe5/CT/manFFI9c0ucEs8rcUZmpXflnds1bf91wtrCXlKDM8dkhmm9UMF8W746dL54Wy15YL3Tj3CuHaq6x7lOHXIsmhZyqGrooCq0R@0pJ8PIVNNIDxiJIBYcKKVIBxQICSKWPEJEx8gX4Q4Mw7xmEG52Kt74ckr3EngsQUZBkvA4kMkoUQoAzBqn2mnaNrNMat/8PV9v4d6h/Ehu4fYDBpFcT2oAK66q/pkTse4sQeTozh7OrTp2PEfXvGdNL7B6kuEP "Python 2 – Try It Online")
There are 23 equivalence classes of characters. Using the 36-character string `'85930A4614012B3C4D5EF6378GH9AI2J3KL7'`, we map each character to its equivalence class (ignoring spaces), then sort the resulting array. Two strings are equivalent iff the resulting lists are equal.
[Answer]
# [Japt](https://github.com/ETHproductions/japt/), ~~38~~ ~~36~~ ~~33~~ 30 bytes
Takes input as an array of 2 strings.
```
®d`z³m`i`oiglbg`í)Ôu)ñ xÃr¶
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.6&code=rmRgepqzbWBpYG9pnIZnbGJnYO0p1HUp8SB4w3K2&input=WyJDSVJDQSAzMzMiLCJJQ0UgQ1JFQU0iXQ==) or [run all test cases](https://ethproductions.github.io/japt/?v=1.4.6&code=Tq6uZGB6mrNtYGlgb2mchmdsYmdg7SnUdSnxIHjDcrY=&input=WyJDSVJDQSAzMzMiLCJJQ0UgQ1JFQU0iXQpbIkRDTFYgMDAxMzMiLCAiSSBMT1ZFIENPREUiXQpbIldFIEFSRSBFTUlTU0FSSUVTIiwgIjMzICAgNDIzICAgIDMzMTU1NDIxMzUiXQpbIldFIFdBTlQgSUNFIENSRUFNIiwgIk1FVCBDSVJDQSAzMzQgTUVOIl0KWyJJIEhBVkUgSUNFIENSRUFNIiwgIkhBVkUgMiBJQ0UgQ1JFQU1TIl0KLVI=)
3 bytes saved thanks to [ETHProductions](https://codegolf.stackexchange.com/users/42545/ethproductions)
```
®d`z...m`i`o...g`í)Ôu)ñ xÃr¶
                                 :Implicit input of array U
®                                :Map each Z
 d                               :  For each pair of characters in the following string,
                                 :  replace all occurrences of the 1st character in Z with the 2nd
  `z...m`                        :    The compressed string "znewem"
         i                       :    Prepend
          `o...g`                :      The compressed string "oireasglbg"
                 í               :      Interleave 0-based indices
                  )              :    End prepend
                   Ô             :    Reverse
                    u            :    Convert to uppercase
                     )           :  End replace
                      ñ          :  Sort
                        x        :  Trim
                         Ã       :End map
                          r      :Reduce
                           ¶     :  By testing equality
```
[Answer]
# Java 10, ~~262~~ ~~260~~ ~~258~~ ~~216~~ ~~208~~ 174 bytes
```
a->b->n(a).equals(n(b));String n(String s){return s.chars().mapToObj(x->x<48?"":"OIREASGLBG.......ABCDEFGHIJKLENOPQRSTCVEXYN".split("")[x-48]).sorted().reduce("",(a,b)->a+b);}
```
-2 bytes thanks to *@Arnauld*.  
-76 bytes thanks to *@OlivierGrégoire*.
[Try it online.](https://tio.run/##jZDBTuMwEIbvPMXIJ1vbWLRJJUQhqzQ1JdA0kFRlV4iDk6ZLSuKE2IEi1GcvprRiV9pDLMsezz/zyf@s@As3VounbZJzKcHnmXg/AljpNG1UltNlIxKVlYJe7IOzSNWZ@NNpVTMsyzzlwrZhCeew5YYdG7bAnND0ueG5xALHhAy@ykHgfSDJe52qphYgafLIa4kJLXg1K4N4hdeGvT6zTn4idIoCL2RONJ4Mx/RrOUN3xC7Gl97V9YRNg5vbMJq5c/br9xRRWeWZwgiR@7VhnTwQKstapQvNrtNFk6Ra6mDeiYlh8x8xGWy2Az0KvasmzrMEpOJKXy9ltoBCD2r/2/sH4ORzaLAbHxTaqUhfdw9MBjshepMqLWjZKFrpHpULXNAl5VWVv2HkeqHrgGmaiBxSnsvA1d58RFohRu5kDsfH3X8YMAnmGhOMWEvKHQMnZMB8L4qc0GPRN8w0dbfV@zz1T7v9vtXrmv323DtnOoO/XB0kn83g4N8Cn01bIj24dLS5/xB3@d63Eu2Jm6PN9gM)
**Explanation:**
```
a->b->                      // Method with two String parameters and boolean return-type
  n(a).equals(n(b))         //  Return if both Strings are equal in the end
String n(String s){         // Separated method with String as both parameter return-type
  return s.chars()          //  Loop over all characters as integers
          .mapToObj(x->x<48?//   If the current character is a space:
             ""             //    Replace it with an empty String to skip it
            :               //   Else:
             "OIREASGLBG.......ABCDEFGHIJKLENOPQRSTCVEXYN".split("")[x-48]
                            //    Convert multi-substitution characters to a single one
          .sorted()         //  Sort all of the converted characters
          .reduce("",(a,b)->a+b);}
                            //  And join all of them together as single String
```
[Answer]
# [R](https://www.r-project.org/), 123 bytes
```
function(x,y=chartr("48UMW36917Z025","ABCEEEGGILNORS",gsub(" ","",x)))all(g(y[1])==g(y[2]))
g=function(z)sort(utf8ToInt(z))
```
[Try it online!](https://tio.run/##ZY5Na4NAEIbv@RXDnnZgD@pqmx48bM2SLvgBmkZoycEK2oBo0BVi/7xd@xWkcxiGd5533unnyp@rsS31uWvplU1@@V70uqfE3T5HOb97sO9fLMcjjIjHQEq536swTtKMsHoY3ygBsyHsiohF09CaTq/2CX1/GZwT4qb2/65/4ND1mo662h461Woj4NwUl0sz0eY8aFpSEqg0EMA5JwyICiQEqRQRQbaB7zLMLgiPYFn2DwRhcjRcspNrLJcgUgkyUlkmUiWzhebcLF1n6SbF9jzXsbn3z5iL@AC3eGOM5AF@n3MhkvHao@BJmC9Wli/FuWkZQWRQ4fwJ "R – Try It Online")
`utf8ToInt` converts a string into a vector of Unicode code points. 
~~`!sd(a-b)` is one byte shorter than `all(a==b)`~~ but that doesn't help here because I'm actually dealing with integers and not logicals.
[Answer]
# [J](http://jsoftware.com/), 56 bytes
```
-:&(-.&' '/:~@rplc'0123456789UMWZ';"0'OIREASGLBGCEEN'"1)
```
[Try it online!](https://tio.run/##VY7RSsNAEEXf@xWXPHQsmHQ3m6hNEVy3Y13INrBbG9rXYhERFD/AX4/b2FD7MANz58yd@94lGR1wX4FwDYEqVprB@PqpS6vxVZqNCTStfh6@vz72JGSuivLm9m724todzRNBjfWsw7J@XBrmFSVy0k1GGL3u3z5BxnqjoZQiHEDWcHRm7ei0Xph6AyHksEfdbCLSLHggWob2DHY2BO0thx5UCkCRH3s0l2VZ5FKV/25avVrj/O5443iNIU4BF6OecItnHb9e0r2Un8Uw0P20jaHMn@sWXhs22lP3Cw "J – Try It Online")
## Explanation:
`&` for both left and right arguments
`-.&' '` removes spaces from the input, 
`rplc` replaces 
`'0123456789UMWZ';"0'OIREASGLBGCEEN'"1` the characters in the input by substitution of the chars in the left column with the ones in the right one: (here transposed for saving space)
```
      |:'0123456789UMWZ';"0'OIREASGLBGCEEN'
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│0│1│2│3│4│5│6│7│8│9│U│M│W│Z│
├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤
│O│I│R│E│A│S│G│L│B│G│C│E│E│N│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
```
`/:~@` and sorts the resulting strings
`-:` are the sorted strings equal?
## My initial solution:
# [J](http://jsoftware.com/), 77 73 bytes
```
-:&(1#.(' '-.~])e."1[:(,a.,.@-.,)'EMW3','G69',9 2$'A4B8CUI1L7NZO0R2S5'"1)
```
[Try it online!](https://tio.run/##VY7dSsNAEIXv@xSHKE4CmyWbTdQGBNftWBfyA5vaUMULkRbxxjfw1eM2GqoXMzAz3zlnPsZI0gE3FQgCGapQqYT19f2YVhexOpMxgVL59ZLsZaSeq1i8SiFvUykS4mbQJGh9uSSxRH5Opri7to9O1VftU5f5vC8pUsmYLLDYv71/gqzz1kBrTTiAnOUQxaah3/PK1ltkmZrvqLttQLoVz8TAMJ7Bjet74x33E6g1gCI/9mCuyrLIlS7/aAbTbnCKO2oa3mB@p0DD7Yw7PJiQ@p@eVvlp2c/0NO3CU/bHdQdvLFvjafwG "J – Try It Online")
## Explanation:
`(' '-.~])` removes spaces from both arguments and
`e."1` tests each character for membership in the follwing table: 
`[:(,a.,.@-.,)'EMW3','G69',9 2$'A4B8CUI1L7NZO0R2S5'"1` the reference: 
```
EMW3
G69 
A4  
B8  
CU  
I1  
L7  
NZ  
O0  
R2  
S5  
.
.
.  
All other symbols one in a row
```
`1#.` adds up the comparison tables for each argument 
`-:&` do they match? 
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 55 bytes
```
{[eq] .map:{sort TR/0..9UZMW/OIREASGLBGCNEE/~~m:g/\S/}}
```
[Try it online!](https://tio.run/##VY5BS8NAFITv/ophEVEo2SSbCK14WLePupBNYDdtwBqkh8aLoTX1Ukr71@O2VYuXd5hv5s2sl93Hfd9ucdPgsd/Nl581gnaxHu02q@4LpeVhEAynL6bihbYk3SR7mqiciB8O7eidvzq@3/ebxRbN7fXbHZpVdzVnSlslIYRgAzCtCMpHDasHno1VNkMYRj8QWTHzvBjTGVcEaQlktHPSanJHlxAAkvh4/dcoTZM4EulfoJJ5iUuNDxgq8TsigaH87NV4lr7tn/WkxBfNsfqh/wY "Perl 6 – Try It Online")
Works with an arbitrary number of strings.
[Answer]
# [Python 2](https://docs.python.org/2/), 111 bytes
```
lambda*t:2>len({`sorted(s.translate(dict(map(None,map(ord,'48UMW36917Z025 '),u'ABCEEEGGILNORS'))))`for s in t})
```
[Try it online!](https://tio.run/##XY5Na4NAEIbv/RWDF9ciRV3tF7Sw3Qzpgh@gaYTSQ2xVKphVdD2U0t9uNBDEzmEYXp6Hedsf9d1IZyyfPsY6O37m2bV6dJ7rQpLfQ990qshJf6O6TPZ1pgqSV1@KHLOWhI0szPloutzU3fu3IKW3D/bdu@V4oBvmoLMXjojbrfDDKE50Y5pD2XTQQyVB/Rlj21VSQUkGjYuYM6CUaiYMmuAIPEYWaMbVwmy4vwfLsi8Q@NF@4qINrrAUgcUIGIgkYbHA5ExTCgCuM@/pje15rmNT77@YsnAHy/dZDHAHl3YuBBiuHAGvbCqxVs6Rs4SJZown "Python 2 – Try It Online")
# 116 bytes
```
lambda a,b:g(a)==g(b)
g=lambda s,y='4A8BUCMEWE3E6G9G1I7LZN0O2R5S ':y and g(s.replace(y[0],y[1:2]),y[2:])or sorted(s)
```
[Try it online!](https://tio.run/##XY5Na4NAFEX3@RUPN5kBKTqj/RBcTCePdEAjaBqhqYuxGltIVdSNv96akjZpN@/C5Rzua8fhvanZdPBfp6P@zAsN2sy9imjq@xXJ6aLyz31vjv7SEfePzzLEFDnerh/WtroLXjZWxGI3gaU3gq4LqEh/05XtUb@VZNxbmTnubY9ldE7mZbTpoG@6oSxIT6e2@6gHOBBDqlgK4JwbJhhKIsgYRWjQxS@xksEOLMs@IxBEu5mKVngNpQgiRsBQJYmIFSYnlnMAcNjpzgu26zrM5u4/LRWbLVyGZy3ELfy85UCIm2tDwZOY9/8I3w27dIlBpy8 "Python 2 – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 105 bytes
```
lambda a,b:X(a)==X(b)
X=lambda s:sorted(("ABCEEEGGILNORS"+c)["48UMW36917Z025".find(c)]for c in s if' '<c)
```
[Try it online!](https://tio.run/##XZJfb5swFMXf@RRXfrGtIpSEZH@isYlRr0MKiQRdE43w4BCzolGCbKKtYnz2zEDWir1Y1rm/c6597eq5fjyV9iVz9peCPx2OHLh5WO4Ip46zIwdq7JyrrpbqJGtxJAS5nz3G2N2dv1pvwgjdpDRG83ffgq395v307ffJbIGsLC@PJKVJdpKQQl6CgjzDgD@k9JI/VToKpDCMWqg65UoocDDGeyNGnh96Lti2jUxAvsfAC5kboAScj1DLs9DIrbd6gMlkemVgtXnQ2OaWjagtAzdkwAI/itzQZ1EH2zYAzGfdqntMF4v5bGov/vdt3fU9vPbWvoDdw7@TzSFg65HFh6@uPsLI0SuzVy0aHBkvlDD0XUd3h1gKSwku00ci8T5GxLr5RLuYYdNbSdftTx9AsQmdlVo/5OlcKUKhH7SWulm/JFuqKvK6yEuhkcQwOkg/sMlL9UvIEbo0uplcC87LxgHctcV9VQp1LmpdzYhOob1WybysSYYz0vDWbA4t1fVmIFsg4nclUv1tltAMkS21AJoYfeF5gUy0@cmfURIPvOMMTNJievkL "Python 3 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~39~~ 34 bytes
```
ØB“¡Œ5a`@ẓRɼ9ẓ“%-/İ"aU5®’ṃyḟ⁶ṢɗⱮ⁸E
```
[Try it online!](https://tio.run/##y0rNyan8///wDKdHDXMOLTw6yTQxweHhrslBJ/dYAimgoKqu/pENSomhpofWPWqY@XBnc@XDHfMfNW57uHPRyemPNq571LjD9f///9FK4a4KjkGuCq6@nsHBjkGersFKOgpKxsYKCgomRiBSwdjY0NTUxMjQ2FQpFgA "Jelly – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~38~~ 33 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
εðK.•2Θ`ĆĀÑεÉ•u6«•B/óÕ¦•…CN9«‡{}Ë
```
[Try it online](https://tio.run/##yy9OTMpM/f//3NbDG7z1HjUsMjo3I@FI25GGwxOBQp1AgVKzQ6uBlJP@4c2Hpx5aBmQ@aljm7GcJEl1YXXu4@///aKVwVwXHIFcFV1/P4GDHIE/XYCUdJWNjBQUFEyMQqWBsbGhqamJkaGyqFAsA) or [verify all test cases](https://tio.run/##bZK9SgNBEIBfZdn6UJNLBG1k3QxmcH/C7l4kBkEFCxsVNIKIkEoQKwvBVos0NoL4AjlrH8IXiXN3OZOLNre333w7P3t3en5weHw0ueR4cja4WGd846oVcTu4mO4mXx/p2/bS9/Cl/vW0/3n7OUwfCN0RGKyOX2nZXE7f08fxiF6/hyNp1jL6fH2T3k@iSb/PJTopWBzHPOIogUkHQvO9iPV5S6ouW1mpFTGmbJfCtgVFdAeYcMBAo/fCIXiS4pgx1qhnT0pZazYb9Vrc/PV3hAlsViTiGgIrG2gwDaZQkbUF1Zo3c1CfIV@YlLDtbMdq6zpt9EDmAtK/ItJWWW9pyZutolLM2km0D1lUKNUjMVHBCS28TBQaDL3p7YAEQwGFuyKgNSS2wEAyjwoRacx2T9FRZ73QaLI2qUmALGQ8mXSkzIvGBwxJKGg@0gLSpRjASdejXpUqklbRLsyJRlQzVtA0I31g92eoDP43VkVGs7WoZigXO47@EaXAGCzLL6BpeTpnPKWkawwibz/6w0jd@wE).
**Explanation:**
```
ε                   # Map each value in the (implicit) input-list by:
 ðK                 #  Remove all spaces
   .•2Θ`ĆĀÑεÉ•      #  Push compressed string "abemwgilorsuz"
              u     #  To uppercase: "ABEMWGILORSUZ"
               6«   #  Append a 6: "ABEMWGILORSUZ6"
   •B/óÕ¦•          #  Push compressed integer 48333917025
          …CN9«     #  Append "CN9": "48333917025CN9"
   ‡                #  Transliterate; map all characters in "ABEMWGILORSUZ" in the
                    #  map-string to "48333917025CN9" at the same indices
    {               #  Then sort all characters
}                   # Close the map
 Ë                  # And check if both are equal (which is output implicitly)
```
[See this 05AB1E tip of mine (sections *How to compress strings not part of the dictionary?* and *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `.•2Θ`ĆĀÑεÉ•` is `"abemwgilorsuz"` and `•B/óÕ¦•` is `48333917025`.
]