[Question]
  [
We say a string is *non-discriminating* if each of the string's characters appears the same number of times and at least twice.
### Examples
* `"aa!1 1 !a !1"` is *non-discriminating* because each of the characters , `!`, `a` and `1` appear three times.
* `"abbaabb"` is **not** *non-discriminating* because `b` appears more often than `a`.
* `"abc"` is also **not** *non-discriminating* because the characters don't appear at least twice.
### Task
Write a ***non-discriminating*** program or function which returns a *[truthy](https://codegolf.meta.stackexchange.com/questions/2190/interpretation-of-truthy-falsey)* value if a given string is *non-discriminating*, and a *[falsy](https://codegolf.meta.stackexchange.com/questions/2190/interpretation-of-truthy-falsey)* value otherwise.
That is, the program run on its own source code should return a truthy value.
Each submission must be able to handle non-empty strings containing [printable ASCII](http://facweb.cs.depaul.edu/sjost/it212/documents/ascii-pr.htm), as well as all characters appearing in the source code of the submission.
### Test Cases
Truthy:
```
<your program's source code>
"aaaa"
"aa!1 1 !a !1"
"aabbccddeeffgg"
"1Q!V_fSiA6Bri{|}tkDM]VjNJ=^_4(a&=?5oYa,1wh|R4YKU #9c!#Q T&f`:sm$@Xv-ugW<P)l}WP>F'jl3xmd'9Ie$MN;TrCBC/tZIL*G27byEn.g0kKhbR%>G-.5pHcL0)JZ`s:*[x2Sz68%v^Ho8+[e,{OAqn?3E<OFwX(;@yu]+z7/pdqUD"
```
Falsy:
```
"a"
"abbaabb"
"abc"
"bQf6ScA5d:4_aJ)D]2*^Mv(E}Kb7o@]krevW?eT0FW;I|J:ix %9!3Fwm;*UZGH`8tV>gy1xX<S/OA7NtB'}c u'V$L,YlYp{#[..j&gTk8jp-6RlGUL#_<^0CCZKPQfD2%s)he-BMRu1n?qdi/!5q=wn$ora+X,POzzHNh=(4{m`39I|s[+E@&y>"
```
  
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 10 bytes
```
=ᵍbᵐbᵐlᵍ=l
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/3/bh1t6kh1sngHAOkG2b8/@/EqagEgA "Brachylog – Try It Online")
### Explanation
```
=ᵍ                Group all equal elements together
  bᵐbᵐ            Remove the first element of each group twice. This fails if
                  there are fewer than 2 elements
      lᵍ          Group elements together that have the same length
        =         Are all elements of that list equal? This only succeeds if the
                  list has one element
         l        Length. This will always succeed
```
[Answer]
# Java 8, ~~198~~ ~~192~~ ~~186~~ ~~174~~ ~~168~~ ~~165~~ 160 bytes (char-count ~~6~~ 5)
```
o->{byte x[]=new byte[+333-3|2],u=-0,i,fe,fi,w; s:w:no0r3sswwyyy:for(int s:o){{u=++x[s];}};for(int b:x){if(!!!(2>b||u==b)|2>u|2>2){x[0]++;}}return!!(0>--x[0]);}
```
[Try it online.](https://tio.run/##zVFZd6IwGH2fXxG6KAi40cWC2LrbVq1Vq1UOtgGCogjKIlLktzt0e@uZGd8mJ3n4cnNP7jKHG0ibK2TMlcVe1qFtgxbUjOAXAJrhIEuFMgLt9xEAyTR1BA0g4/IMWoIIbIKLgDA60bYd6GgyaAMD8GBv0oVA8h0EtoLIG8gD74NAMgxDM7usSLk8naY0SkWUqlEeB2zWYw0zbTG27Xm@77OqaeGRgggwiSBweZLcCrbIhSH3jUjslgg0FccwDM8WpN3O5XmJ2GULbnSyRLAV0iJJRgwLOa5lRK/SBZp@vyW4cM99ql65kh6p/hK/MTUFLCP/eM@xNGMqiJD49J5KgZ7pWlEYsqkgoDk20lX2A@r5toOWSdN1kquI5OgGbiRl/Oh/j@Ao6ZjlqMiiZUEfJ4iPMn@084V8B9G3XGfm/9k8jNa/f/BFwTIgAzAIsMzBVEmSZUVBSFWn0wPJmUds8KL2tOJFydKCXegsKi1xMG/f8ZOXMxzG@OtzcwSpjDfbdc9G90/g@ErGjh9BP6a@svby5OZ5Q7vTYb5D6OGwU6jF5zqzXSrxq1t00mpzfatcKqec8W0zUc9eSn7VSE7Ti/uZ1D0t1Onk@aohN9PE3fjVZhPCNtt7u8idbiYNM0cKiAoeimvjmqnmH2reM87d@K5Ivl2mVsr6qXJQf9/d1aBuo791d2j6kvRewMEs@UCG9Khe9OTiucKevcA7oiJmE5PWBq@G99KleSMuLLQZXqN@ujbkbnd3rLYFp1cYU/OWXOJpXG@85pxBYepnts/5XuqheNl2SvFQBm58cNKkRvpoFRwLyeQ8Nu0vcvMVfdHV60/N45f8JF0uj@87j2ole2oTM0SXWl03Y1yvFS2Fna95zzgxLUg@U52Ht7dGe8bjZ8Hylbm63dkCWb2J@YUffYa/wv1v)  
[Code used to verify the occurrences of the characters](https://tio.run/##VU@xboMwEP0Vk8kuYCWwgUhVdWmlVh0YEYMhR@Ik2MjYAQSRsrdfmR9JTdMOHU6nu/fuvXd7dmK@bEDsN4fbjdeNVBrt7ZIazY/0IeZCg6pYCeh1bDXTvEQnyTeoZlzgVCsutlnOyPjOGlQnAjr0wtqdnTCJK6lwuWMKldEMpCUTAhROh1ZDTbkgVECv37gATKiWz5b6pBQbMCE1bYzGpVfTLdh@vXxdL5/ESYQ5Hh@xDUX@I@4qWt0NP4o9lBpBVNMDDKnlEPLrKI2mjU2sjwKDu4jQwr2rACHx@Xy7SX89FoMG1Gf5zy/zkLlhGPrhFOSeSfylx70KvIp7XYzaqIuEXKqwbbtuGIZoDmD1LSDJOJrEdfusza12/IcUUU9GXmHHcXCwLqbJJElBpmBtbAVk7LNl7rr2QoE2SljWcu3789ZG/AY), which was my answer for [this challenge](https://codegolf.stackexchange.com/questions/19068/display-number-of-occurrences-for-every-character-in-an-input-string/83741#83741).
-5 bytes thanks to *@OlivierGrégoire* again by getting rid of the comment and making a mess. ;)
Old **168 bytes (char-count 6) answer**:
```
o->{int w[]=new int[2222],u=0,f=0;for(int r:o)u=++w[r];for(int e:w)if(!(2>e|u==e)|2>u)f++;return!(f>0);}//[[[]]]  !!!!e(i)++,,,,-----oo////000tuww::::{{{{{;;||||}}}}}>>
```
[Try it online.](https://tio.run/##1ZNZd6IwHMXf@ylCWxVEBbfaSqF1bbXu2pWDbYCgKBJlEa3y2R3sMk89M@Pj/E7ykPxzs9x7MoFLGMdzZE7U6U4xoG2DJtTNzREAuukgS4MKAq39EAAZYwNBEyikMoaWKAGb4oKCH/Sg2Q50dAW0gAl4sMNxYRNsADxR4k3k7TcTUwFSzOXZmMaznIYtcr/CymPK5WnaEy3p9yTKe5SukQSZEtDW5XlEbVOCS2k0zVnIcS2TIDWBpTifYURRlCQJACIAkTpF07GA@B6MmQCWZR3X8/IBmz0ctw3w9wjCjvu8/dyVjeD2X49YYl0Fs8AHsu9YujkSJUh9esAwoI9dKzBFwSoCumMjQ8t/lPpr20GzBHadxDwQOYZJmgmFPP5frDhOOLgUBFuwLLgmKeoj3B@f9VX5NmRguc54/WcTYMC/H/AlIZIgCQgIiOTBUllWFFVFSNNGowPFyS7x8Kr19cJZ0dI3W9@ZlpvSw6RV54evGRKG@assfoaxpDfe9jLPd/fg5EIhTrpgENbe8vbs9PppGXdHj5cdyvAfO0I1MjHSq5kauaih02aLG1ilYolxXmqN6E0qJ68rZmLETu/Gci8k3MQT2fmt0mCp@subnY@Kq1T//ew8tBze4nNaRLFNu7Awr9KVy3bVeyK567Ur0e85Zq4u7ssH5fedXRUaNvpbdoe6L8v7AA5WKQcq5K521lcKWTWfeYV1qiylosPmkqz4d3IOX0tTCy0fr9CArT5ytW09r69A6IJIV70ZF71/ubl9O3cehNE6uXq67DPtQq7lFCO@AtzIw2kj9mw8zzcnYiIxCY8G0/PJPH7WM27uGyevl0O2VHq563S1cipkU2MULzZ7btK8Wqg6Q2QXvGeeYgvST7FO@/39tjXmycxm9pa@qG1tka5ch9c//zT/yN/9Ag)  
[Code used to verify the occurrences of the characters excluding comment](https://tio.run/##VU9BbsIwEPyK4eStwQKOiZyq6qWVWvWQY5SDGzbgENuRsUkRIHFvX8lHUkOrSt3L7s6MdmYbuZNT26FplpthULqzzpMmgjx41fK7VBmPrpYVkufD1kuvKrKzakm0VIbm3imzKkoJh1fZES0M9uRJbtdxo5DW1tFqLR2pkiuRV9IYdDTfbz1qrgxwgx/@RRmkwL19jNIH5@SeAmjeBU@rieYrjP1y/rqcP2EkTGjbexpDwX@GzZP5j@Hbe4OVJ5hovsF9HjUAv442eN7FxL41FNk4IWP2cwUB0tNpGOw0O0Sa9EV5eyXOxSJWOQliNqnF7OZwVbjEQhCM9YUr/0BMelA1HdFFhscgBMJxkQWoGUsd@uDMiNbZLFp9Aw), which was my answer for [this challenge](https://codegolf.stackexchange.com/questions/19068/display-number-of-occurrences-for-every-character-in-an-input-string/83741#83741).
-6 bytes thanks to *@OliverGrégoire* removing `<` by swapping the checks to `>`.
**Explanation of the base golfed program (98 bytes):**  
[Try it online.](https://tio.run/##lZFrW6JAFMff76cYuhgkKJe0AqHMsqt20a48VAMMiiIYM4gEfPYWt9pX@@yu88y8mDnnf878zn8EZ5ALpsgf2eMPy4MYgw50/fQHAK5PUOhAC4Hu4gqAGQQegj6waGsIQ90AmFGKQF6cYmMCiWuBLvCBCj4wp6VFAQB1Q/VRvCimi7W6wRKVZx2VV5wgpBcJlowZopbLULeM34@uDBnXoV1NKLmUSjLSEBmnXFZCRKLQB05DUPIP5bPvNDK9ou9X@1ng2mBSENA9Err@QDcg8/n7ahX0gigscKzARsAlGHmO/CvUSzBBk0oQkcq0EBHPp/2KRa8EBYSZEATmXxSLi16WJImTMtFgI5XjWZd1EOu4bKwALMeyH/ChhHEcJ0kif/NgOWDSNCow5zo2lDz/TWrKcyYtUCmKokXNzLJIVU0mE7WoOCKTznXeKMDz/BO9yOI1jlu8Mkq@UiFBq7CiGYYwoRnmlx1/xPmKfA@iH0ZkmPwdHhbr/xt8SSgBCICCgBKWlpqmZdk2Qo4zGCwpFq6puxen5zbrB6GbZjkZH3aMu1H3TH1@2aJhSd2rBY@QFeJhdrP1eH4LVnctavUa9EvOq4wna/sPMy4a3DeuGC@/v9LaGyNPmk/sjd1TtNbpKv2wddCqkqfTi81jcdtMjvzKgB@fD82bde2Yq9SmJ9YFz5w9vWJ5U5@Lvff6zvrs@STYKeuITS@bb/6edNS4bMcPtLKfREb5fbs6td9uD5fy79u7NvQw@pd3y07fNBcGLK2yllSY1069ZzVrtrz1As@YQ0PcfO7M6KP83NwO9o1xiGb3e6jPt@@V0@xMdudgfZeS2vFE2bx9Oj553SF32iAR5g@NXvWyud0lBxu5BaKNu7UL9tF7nKareqUyKg36453RlKvfeMe3F6svjWe@1Xo6v7p2DsV1zAwRd9C5iQR/7812q1TtTY39tSCE5Qf26vL9/aQ7VOmtdPIq7Z5mWC8f7ZcS7Y@c@Y/84yc)
```
s->{                     // Method with character-array parameter and boolean return-type
  int a[]=new int[256],  //  Occurrences integer-array containing 256 zeroes
      t=0,               //  Temp integer, starting at 0
      f=0;               //  Flag integer, starting at 0
  for(int c:s)           //  Loop over the input
    t=++a[c];            //   Increase the occurrence-counter of the current character
                         //   And set the temp integer to this value
  for(int i:a)           //  Loop over the integer-array
    if(i>1               //   If the value is filled (not 0) and at least 2,
       &i!=t             //   and it's not equal to the temp integer
       |t<2)             //   Or the temp integer is lower than 2
      f++;               //    Increase the flag-integer by 1
  return f<1;}           //  Return whether the flag integer is still 0
```
**Some things I did to reduce the amount of characters used:**
* Variable names `o`, `w`, `u`, `f`, `r`, and `e` were chosen on purpose to re-use characters we already had (but not exceeding 6).
* `2222` is used instead of `256`.
* Changed the if-check `e>0&u!=e|u<2` to `!(e<2|u==e)|u<2` to remove 6x `&`.
* Removed the two separated returns and used a flag `f`, and we return whether it is still 0 in the end (this meant I could remove the 6x `by` from `byte` now that we only use `n` in `int` 6 times instead of 8).
* `e<2` and `u<2` changed to `2>e` and `2>u` to remove 6x `<`.
**What I did to reduce the char-count 6 to 5:**
* 2x `int` to `byte` so the amount of `n` used is 4 instead of 6.
* Used `x[0]` instead of a new variable `f=0` so the amount of `=` used is 5 instead of 6.
* Changed `2222` to `3333` so the amount of `2` used is 2 instead of 6.
* Changed variables `f` and `r` again so they aren't 6 anymore either.
**What @OlivierGrégoire did to get rid of the comment, and therefore the 5x `/`:**
* Adding unused variables `,i,fe,fi,w;`.
* Adding unused labels: `s:w:no0r3sswwyyy:`.
* Adding unused `|2>2`
* Adding `{}` around the for-loops and ifs, and added an unused `{}`-block.
* Changing `!` to `!!!`.
* Changing `|` to `||`.
* Changing `333` to `+333-3|2`to get rid of leftover arithmetic operators `+-|` and the `2`.
* Changing `!(x[0]>0)` to `!!(0>--x[0])`.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~18~~ ~~16~~ ~~12~~ 10 bytes
```
Ġ¬zḊḊ¬zĠȦȦ
```
[Try it online!](https://tio.run/##bY@3ktpgFIV7nuIXIiOCyDmDyDlrBCiDEFEiSEDjxjN@iq222gdwbW@xr2G/iKz1ejvfOcV3z5zmE1hRVDTt9enHi/rr@zc9Orw@vT2/PWs/v/7@8qIH0zTcAHDj/0ZGAgEwkFiRAzIrye8zUj8jYgBAJwgFKIBIAKGfDUXRNMOwLMfx/EeHdqDhnOutsqHccXW7P@R1oUEMhWY1OZsHbKQlmQ7uJiSCXpb3bmBSGwA4SkNwB/Qt3CImbUyZ8dl14keJtl18jNqpklUQ/dcNY41WWFOjGe8f87m8R55W6g7MF6aU4tbNe9e1JdU1pzCXO7gv03WvvTpdSDEHfvX11FDEfJ6VdxEnziK3VvawTfuLiVbpMrbFM8qJcKphz545DAq6@l/df2YU9S73@dAfQHW4UI/OBplYYE5W7QXC55g1zrbio0aFdxlifWTPozTb95ZG8cq9GltdgTkK@UuXTdwxmGLlRUQepngFvY4TPU8rG27KOeuDBifr0FRHJuJkf4Nxt1uw8P11RNi7Ql0RG9TheWLmzeentXaHK/jMkn3JunKN7gndpg/MygMFD8nL1rQ7ks4x0m6parm5TNoCt83CH63cJdxZzFiUlJEwEH8A "Jelly – Try It Online")
### How it works
```
Ġ¬zḊḊ¬zĠȦȦ  Main link. Argument: s (string)
Ġ           Group the indices of s by their corresponding elements.
            "abcba" -> [[1, 5], [2, 4], [3]]
 ¬          Take the logical NOT of each 1-based(!) index.
            [[1, 5], [2, 4], [3]] -> [[0, 0], [0, 0], [0]]
   Ḋ        Dequeue; yield s without its fist element.
            "abcba" -> "bcba"
  z         Zip-longest; zip the elements of the array to the left, using the
            string to the right as filler.
            ([[0, 0], [0, 0], [0]], "bcba") -> [[0, 0, 0], [0, 0, "bcba"]]
    Ḋ       Dequeue; remove the first array of the result.
            This yields an empty array if s does not contain duplicates.
            [[0, 0, 0], [0, 0, "bcba"]] -> [[0, 0, "bcba"]]
    ¬       Take the logical NOT of all zeros and characters.
            [[0, 0, "bcba"]] -> [[1, 1, [0, 0, 0, 0]]]
      Ġ     Group.
     z      Zip-longest. Since all arrays in the result to the left have the same
            number of elements, this is just a regular zip.
            [[1, 1, [0, 0, 0, 0]]] -> [[1], [1], [[0, 0, 0, 0]]
       Ȧ    Any and all; test if the result is non-empty and contains no zeroes,
            at any depth. Yield 1 if so, 0 if not.
            [[1], [1], [[0, 0, 0, 0]] -> 0
        Ȧ   Any and all.
            0 -> 0
```
[Answer]
## [Brachylog](https://github.com/JCumin/Brachylog), ~~14~~ 12 bytes
```
ọtᵐℕ₂ᵐ==tℕ₂ọ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r//@Hu3pKHWyc8apn6qKkJyLC1LYGyd/f@/6@ET1oJAA "Brachylog – Try It Online")
### Explanation
```
ọ   Occurrences. Gives a list of [char, count] pairs for the entire input.
tᵐ  Map "tail" over this list, giving each character count.
ℕ₂ᵐ Make sure that each count is at least 2.
=   Make sure that all counts are equal.
    At this point we're done with the actual code, but we need another copy
    of each character (except ᵐ). We can just put them after this, as long as
    we make sure that they can never cause the predicate to fail.
=   Make sure that all counts are equal, again...
t   Extract the last count.
ℕ₂  Make sure that it's at least 2, again...
ọ   Get the digit occurrences in that count, this can't fail.
```
Alternative 12-byte solution that reuses `t` instead of `ᵐ`:
```
ọtᵐ==tℕ₂ℕ₂ọᵐ
```
[Answer]
# T-SQL, 320 bytes (32 chars x 10 each)
Input is via pre-existing table `FILL` with varchar field `STEW`, [per our IO standards](https://codegolf.meta.stackexchange.com/a/5341/70172).
```
WITH BUMPF AS(SeLeCT GYP=1
UNION ALL
SeLeCT GYP+1FROM BUMPF
WHeRe GYP<=1000)SeLeCT
IIF(MIN(WAXBY)<MAX(WAXBY)OR
MAX(WAXBY)<=1,+0,+1)FROM(SeLeCT
WAXBY=COUNT(1),WHICH=+1+0,HEXCHANGE=+01,HUNG=+0+1,CHLUB=+0,GEFF=+0FROM
BUMPF,FILL WHERE
GYP<=LEN(STEW)GROUP BY
SUBSTRING(STEW,GYP,1))CHEXX
OPTION(MAXRECURSION 0)----------<<<<<<
```
I have never been more pleased, yet horrified, by a piece of code.
Must be run on a server or database set to a case-sensitive collation. There are 10 each of 32 different characters, including upper and lowercase `E` (SQL commands are case-insensitive, so flipped a few as needed), spaces and tabs (tabs are shown as line breaks in the code above, for readability).
I found ways to include 10 each of the other symbols `+ = ,` in the code, but unfortunately couldn't find a way to do that with `<`, so I had to add the comment character `-`.
Here is the formatted code before I crammed in all the extra filler:
```
WITH b AS (SELECT g=1 UNION ALL SELECT g+1 FROM b WHERE g<1000)
SELECT IIF(MIN(w)<MAX(w) OR MAX(w)<1+1,0,1)
FROM(
    SELECT w=COUNT(1), --extra constant fields here are ignored
    FROM b, fill
    WHERE g < 1+LEN(stew)
    GROUP BY SUBSTRING(stew,g,1)
)a OPTION(MAXRECURSION 0)
```
The top line is a recursive CTE that generates a number table `b`, which we join to the source string to separate by character. Those characters are grouped and counted, and the `IIF` statement returns 0 or 1 depending on whether the input string is non-discriminating.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~333~~ 168 bytes
*Thanks to @Kevin Cruijssen for saving 9 bytes and thanks to @Laikoni for saving 45 bytes!*
```
f(r,h,a){char*o=r,c[222]={!o};for(a=!o;*o;)++c[*o++];for(h=!o;222/++h;c[h]&&c[h]!=a&&(a=!*c))!a&&c[h]&&(a=c[h]);r=!(2/2/a);}/////!(())****++,,,,,[[]]fffffrr{{{{{{}}}}}}
```
[Try it online!](https://tio.run/##lZNrU6pQFIa/9ytAE9mAIqhZImpZlnbR7hphweayKd0oYpnEb@8AXaYz02nmPB@YNe9aDLPW8MCcDeHbm0V7HOI0EECkeYwrexxURFFU5YB0Q8lyPVqTSVdiXAmwLFQYl2XVJEZxHE3yLIskqCCVouInKWsUFb/DQABI7T1MkrgAkieTtMiLvAakkI8haRoAJoJluRhFUVUrxvOChDDhLe1gOF4YJlGb@4bj5lF9zcE@MdEcTIO1YI2ImHpRZNGpjHGLUxwRVVpECgDpn21SIASC1AhS@HVM1yE0DNO0LNv@ZVA4Ja/urHNne2PHc4LX0H/cPVavHk668uiuRGuU3Ci7Q40TntHrWWl4eEmktyCZPiUuKOu@Op@sNwdPuYV9XeuDcXjdr7ezD@PicmJktzrm@vGJdOG1dlq8f9M5YvbFiv6yh/N24fEQ6WeZ@n4uX54ewKMC6N7cz6uMshTPVxubmafRgbvJKiYX9LZnuFHcq/XazwNaar4sVHZV4afG7HI3WemvnW7xt/V/O42ux9f5dQL@0H3v6afWxjncLhvV0p3WBbuqyIyOn@i98FCvuE310TOfrhvmRaF9LXVeu1VnSWS2yGL7eSIxlzf7B/eb/lXdfhGWg9o539uunPg72RASi@zV@hE3HA@nQVrJ5x8o@@Jx82Ga2zgb718epe9qo0KrdXPYP7V2xcwcIDO3c3y2EHBjZjg8WZ7Jz3jd9TR2wPV7q9XBCZLpUjC5L251XucKu9ekXuo/HewW52LiIvWxbywVAV3DVMqCqL5nlm36czoOOSJKOSL@n/HPB5r7nrGYJsMg/mKY@Iq/fEXffUVfviKJQR@@ok9fcRy/@4ojX3HiK/7JV/zpK/4vXxF2E/729g8)
# C, 333 bytes
```
i,v;f(S){char*s=S,L[128]={0};for(v=0;*s;)++L[*s++];for(i=-1;++i<128;L[i]&&L[i]-v?v=-1:0)!v&&L[i]?v=L[i]:0;return-v<-1;}/////////!!!!!!!!&&&&&(((((())))))******+++,,,,,,,----00000111122222228888888:::::::<<<<<<<===???????LLLSSSSSSS[[[]]]aaaaaaaacccccccceeeeeeeeffffffhhhhhhhhiinnnnnnnnooooooorrrrssssssttttttttuuuuuuuuvv{{{{{{{}}}}}}}
```
Even the bytecount is non-discriminating!
[Try it online!](https://tio.run/##7dRXc6JsFADg@/wKiA0EFGxREWuMDUtiD8FGUYyi0izob8@C8M18O5PN1V7ucwEv5xwGzhl4OWzJcV9fEmqQItSFTW41V4Iq1UVphogkWcrEb6S4UyCDwsmgSsIIQjNBFUHYe1SiMIJEEClj1ZI0I7F@v33EjJxhZdI4DBpOxLq2T2mcVARNV2TMyFh33sL/AV1@G3QH3wXvEARBHZgFtxGWiCPpSDsyDoqicg6aprsOhmFYlp27OJfgEu9WLkmSXTuHYlHvNJfuMgzTcXN8eSSZ2@i8AGRUjZd2oVX2QZI1YDuXZAh@MB8Ay16xQiL06OM/5EcUsFb2Oz3CMPnHNEgABADOAZD4sWyx4Diet/tZLn8oJF7BwVTsSoVEUZHM6037fG6yg3WrTk2mMWjup3Lx3XiOEsfV9S02bvQBT4oDPa9Azy/O0urWmx8ZmL4cZjrw5jbsZF8C6030tOUDqZrgbbbInlIqlsLae40OViJPi3NZDi3xz8Zq8ebLVrBQfF/laByuv8/UdJA5RbqXRNJnTKq7JMIIqNkuHORctJxpvxxHEJk/6yxyeQrv@UP/@d7Sbz19yP9r/6fRLBb2dH6s4L7JOrnFq5jocoU4n45N53X4mY0EJ00DKt8ai6ddnv1UBGOYE3r4y5CsXetp6QT4UmD05bglg/33SnWW1AbZ5Zk4jTLdcLvw1NKKgRsH6IGBl0bHm/He9DCh0Nq/7H0m13ss8bap9GnPNDPBS6X3RudVfI74VHglYMXmm07IuQMvhcH4gTrK3p0yR0Zop325VFsrCoqZ21k0VbuqDFLO@8/Z7wb2Ids/EmYvHt1@7T8f4Ha8wMSJCOvExKWgqZAdRAErigL29yx/PyBVU3h9fy@G7Sfe/m0qf3NT@QU)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~20~~ ~~18~~ ~~16~~ 14 bytes
```
S¢Z≠sË*sZ¢≠SË*
```
[Try it online!](https://tio.run/##MzBNTDJM/f8/@NCiqEedC4oPd2sVRx1aBGQGA5m4xAE "05AB1E – Try It Online")
The program is essentially divided into 2 parts where the goal of the first part is to do the actual task and the goal of the second part is to use the same functions as the first part without altering the result.
**Explanation (first part)**
```
S          # push input split into list of chars
 ¢         # count the occurrence of each char in input
  Z≠       # check that the max count is not 1
    sË     # check if all counts are equal
      *    # multiply
```
**Explanation (second part)**
```
s          # swap input to top of stack
 Z¢        # count the number of occurrences of the largest element
   ≠       # check that the count isn't 1
    SË     # split into list and check that each element are equal (always true)
      *    # multiply (as it is with 1, the original result is left unchanged)
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), 14 bytes
```
§<ε#εu§m#u
m
<
```
[Try it online!](https://tio.run/##yygtzv7//9Bym3Nblc9tLT20PFe5lCuXy@Y/NkEA "Husk – Try It Online")
## Explanation
The two short lines are no-ops, since the main function never calls them.
```
§<ε#εu§m#u  Implicit input, say S = "asasdd"
         u  Remove duplicates: "asd"
      §m#   For each, get number of occurrences in S: [2,2,2]
     u      Remove duplicates: L = [2]
   #ε       Number of elements in L that are at most 1: 0
  ε         1 if L is a singleton, 0 otherwise: 1
§<          Is the former value smaller than the latter?
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~75~~ 69 bytes
```
def f(s):len({2<<s.count(c)-2for c,in s})<2or{{e.dil:-tu,r.dil:-tu,}}
```
Output is via [presence or absence of an error.](https://codegolf.meta.stackexchange.com/a/11908/12012) The error is either a *ValueError* (one or more characters occur only once) or a *NameError* (the character counts are unequal).
[Try it online!](https://tio.run/##XY/nzqJQEIZ/61UcPwtgQcWOvffedS2Ug6IICAe71@6qye4mO8nMvFPyTEa9oq0iUy9O4SFIAgzDXjwUgIDrBC1BGb9TiYROcoohI5wjPJSgaIBzizLQn0SCUrT7HZK8KNEeZLi1v@r5fL1JpI40UcUJsxleIAc@J8zm81aUIBhoBqTNJqRd39Ek4KKsGggniHehaqKMvgtmE7xwUEWg2C4VNU3R6L9j7Jfch5IAENQRjbm/jA//f4BJY0Qdgv5VR/BQvIjoD/MfqsRIOnz9MG/7Mb@TxQ/8wMIAi/9bsizH8TyEgrDZvBv@rmW0EvpiNpzTxPvjifaF5mK0a9WSy1UQZxzJdEiZMm7/efvoBaf1IbDGOIu1CwYOYU3rB1tmcvIYm3GiQ0jPcSdVwnZS4HLgsVgV2pqt@EDL5/JeNKs2nGUqwl6LMrnx7etbtmdPlT1kSK1wDR9Rm6112jm/UP1bOGo/LStK1DWH7ns7e5TTgWKiXTpP8Hjmaixct4hX5Y/DwueXj7Ps56Wv4t6R7QrhPpcN8XRwxdSIwoJyLpsnvPissxEls9hr8DROw4GvNI5XHzVavAB7zBIonQ9x53BWrqyjaJTaXP2XSaLvbWcjLZTDnhwwsJGt4Z5KU/VunZPkzrEZ7KM71RPuSeVhw7pKLH35/Kze6QoFyq4TW@jJNXuGX04fedFrCR2TZ9mmaIxr4u60b7dKa5vEg/fDOhCrPvS5q5hxXFM/vwE "Python 2 – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog) v2, 8 bytes (in Brachylog's character set)
```
oḅ\k\koḅ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/P//hjtaY7JhsEP3/f7ShoaGOgqG5uY6CpRGQYYDMgMnFAgA "Brachylog – Try It Online")
Looks like there's been a golfing war going on on this question in Brachylog, so I thought I'd join in, saving a couple of bytes over the next best answer.
This is a full program that takes input as a list of character codes. (This is partly because Brachylog appears to have some very bizarre bugs related to backslashes in strings, and partly because the `\` command doesn't work on lists of strings.)
## Explanation
```
oḅ\k\koḅ
o          Sort {standard input}
 ḅ         Group identical adjacent values
  \        Assert rectangular; if it is, swap rows and columns
   k       Delete last element
    \      Assert rectangular; (rest of the program is irrelevant)
```
The `koḅ` at the end is irrelevant; `k` will always have an element to act on and `o` and `ḅ` cannot fail if given a list as input.
The reason for the starting `oḅ` should be clear; it partitions the input list by value, e.g. `[1,2,1,2,4,1]` would become `[[1,1,1],[2,2],[4]]`. In order for each character to appear the same number of times, each of these lists must be the same length, i.e. the resulting list is a rectangle. We can assert this rectangularity using `\`, which also transposes the rows and columns as a side effect.
We now have a current value consisting of multiple copies of the character set, e.g. if the input was `[4,2,1,2,4,1]` the current value would be `[[1,2,4],[1,2,4]]`. If we delete a copy, the resulting matrix is still rectangular, so we can turn it back using `\`. However, if the reason the matrix was rectangular was that all the input characters were distinct, the resulting matrix will have no elements left, and `\` does *not* treat a "0×0" matrix as rectangular (rather, it fails). So `oḅ\k\` effectively asserts that each character that appears in the input appears the same number of times, and that number of times is not 1.
That's the entire functionality of our program (as a full program, we get `true` if no assertion failures occurred, `false` if some did). We do have to obey the source layout restriction, though, so I added an additional `koḅ` that has no purpose but which cannot fail (unlike `\`, `o` and `ḅ` are happy to act on empty lists).
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~144~~ ... ~~100~~ 96 bytes
```
o=>!(a=o.split``.map(i=>o.split(i||aeehhhlmmnnnpst)[`length`]-1)).some(g=>![g>1][-!1]||a[-!1]-g)
```
[Try it online!](https://tio.run/##fVPZcqpAEH33KwA3UCHBLUZEjfse17hQKIvDYhBQEPdv96LeVKXuw52HPtNdZ05PT51Z8Q5viVvVtHHdWIKbRN8MOgujPG0QlqmpNscRa95EVTr7t4CqlwsPgKIo2nqt67pp2RjDaUCXbYVjcRLDCMtYA1R2ZRg5S7IMDpOse@aBuIzdKI9DI0hYojwmzRAEoYM9NAA26mAs5VnR5k9D56chRjzlXXHKIxq6ZWiA0AwZRYoKv@VFG2wh0djpdhpCXIZkbNEDpOqQif0mm8yBjazc8K/IEFg2xMu8qrsouq/wlPnN4STUd3auGERDvrPk3vTKuYz/yNj3ROQtYD3FGIR3FxLxuAiTEAnBPASTz1wQRHG5BECSZPleIXvw10IaqB/JwlY9X672d6nNfq06DXq@iKN8gM4ljCkfIffKpR@fNkeQ912EvT1oGJC4tLX25ScOvpPHmS6mXcfdbCW40mKH9TL4Xge@docabouF4os9q7dC1eibcCzrhPz63VSEvj9bxYmEWRNbr1hjxlnpEHOIDk7JlN@Z14xUmAGR8@fHRs/FypnPyn6CUvnjjg2f3l7M5WZUekzzCIJwn@q5Fe8g9KTkQPxILNPxBd/ASmw0NG87aPnaFN6MPPu9Bc44B4avlTFVvzTS6gHyv8Oxyn5NhUazao1L2V9Z@UgeJpnBy@fHW8cuBK8itAt@@VqRqTY1z17XSKuAPPxOrUw82deqo5Z3kZm/FouzZrcnlaJ@C1MAXmj3d6Se2yzVFzixofe6z9jy4Umk@3k61ToKjcbPay72Xr9YTLicDxyzCPtwo/sn/rED4jsbV@THEMbdENjtDw "JavaScript (Node.js) – Try It Online")
~~24 different characters \* 6 times each~~ 
~~28 different characters \* 5 times each~~ 
~~27 different characters \* 5 times each~~ 
~~27 different characters \* 4 times each~~
~~26 different characters \* 4 times each~~
~~25 different characters \* 4 times each~~
24 different characters \* 4 times each
**Explanation**
```
o=>!(
 a=o.split``.map(                            // Split the input into character array and
  i=>o.split(i||aeehhhlmmnnnpst)[`length`]-1 // count the occurrences of each character.
 )
).some(                                      // Then check
 g=>![g>1][-!1]                              // If each character appears at least twice
 ||a[-!1]-g                                  // and the counts are all the same number.
)                                            
More to add:
1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates
   the count.
2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters 
   (v,r,y in every)
3. Still one unavoidable inefficient character left ({h}).
Update:
1. Got rid of one {.} by replacing {.length} by {["length"]}.
2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}.
3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}.
4. Finally, because count per character is now 4, the backslashes can be taken out.
Update:
1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut
   evaluation. 
   {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which
   must be evaluated to true.
Update:
1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing 
   all {c} by {a}.
   Since {i} is never an empty string, it is always evaluated true (except compared 
   directly to true).
Update:
1. Got rid of all {,} by moving the assignment after the argument list. The {()} at the
   front can therefore be moved to the assignment, retaining same number of {()}s.
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~84~~ 80 bytes
```
x=input()
c=map(x.count,x)
print max(c)==min(c)>1
1. or our>ram>>utopia,
1., 1.,
```
[Try it online!](https://tio.run/##TVBnk6pAEPzOr1gzGPAwJ4yn3plzLAPgqijJFRTTb/eB3l29rZrqma6ume5VLupWlgJPTl5B2mq1PnWalxRNxQmMo0VGwXWSkzVJ9eoEpiBeUoHI6DhH0LTISwamKYwigYyArKE0YsR0WlNlhWe8Bu0FRj2NpeRRRbxirDxveQGCHtJgAgNARRcTAIA65IDpADN7DioqKDZLRYRk9BawCDJ77G0A40VFRqqhFwTIqbwsHbGXRUD/z5EFk4MIN/f@en/pfnqXESTh8r7zmDx5YgQNHnHiV@0SoGQqDHgriD8L5hcZ9wRGZFdM4u39L8XTyhjPihlgoQAFLAywUK@RZTlutYJwvd5sDIJqWwaLdZfPRfKIv90f6v6zPhvsGhV6vgjhjJPOhOUx46XO23snNK72gS3OWWxt0HOul4mjaM@OTj5tM0y1COExbKVLrp0Q1MWVK/4N7fVGsocK@YJfnXzX3OVAlL0UJXLzsa9u2Y4jXfaRYeWLq30QlcnymHBP9UD3Gok5TvMvOeaZQu@tmTtImWAx1SydR3gye9FmnmvUr6wO/U8zi1ksa0Z6ddxPvtf0w7LtdaTL5cKrRGjBVIjPWcA9r5/w4qPKRuXsbI/gaZiBvY/SMPl9ryR4HTjilmDpLCbd/Un5axlTB@nNhdJHqa6/mYs21LzrwQHNNbDXvGNhrNxsU5LcOTe9fWyn@CIdodyv2Rap@UehMKm22uvPgONIbKEvX@9olJQ5rHi/JXygz5JdRoxn5G01r9evxpbGQzdxGYx/349TTzHrvKSt/wA "Python 2 – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 18 bytes
```
oḅlᵐ=h≥2
oḅlᵐ=h≥2
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/P//hjtach1sn2GY86lxqxIXG/f9fyTBQMSw@LTjT0cypKLO6prYk28U3NizLz8s2Lt5EI1HN1t40PzJRx7A8oybIJNI7VEHZMllROVAhRC0twao4V8Uhoky3ND3cJkAzpzY8wM5NPSvHuCI3Rd3SM1XF1886pMjZyVm/JMrTR8vdyDyp0jVPL90g2zsjKUjVzl1Xz7TAI9nHQNMrKqHYSiu6wii4ysxCtSzOI99COzpVp9rfsTDP3tjVxt@tPELD2qGyNFa7yly/IKUw1EUJAA "Brachylog – Try It Online")
Unfortunately, I can't remove the linefeeds, since `ḅ` on a number triggers a fail.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 104 bytes
```
($qe=$args[0]| group |sort count|% count)[0]-eq$qe[-1]-and$qe[0]-gt1####((()))%%%pppddd===aaccss11nu|0gr
```
[Try it online!](https://tio.run/##JY1NCsQgFIOvUphKdSHUA3gScfHqe7WLotYfZuPdrcNkk/AlkBS/lMtF9z0GXx/SK2RfzG774nNsaekl5rq42ELt7O9i1pKeuTZSWQkBf3EyX9VninMuhGCMpZQQUWsN4FwpSoXWd5/HvDLugmys3QCOwzlEovP0fhMv "PowerShell – Try It Online")
This was great fun to golf. The limitation was `$`, which we need four of at minimum (one for the input `$args`, one for assigning the computation result `$qe`, one for checking the last character `$qe[-1]` and one for checking the first character `$qe[0]`, so that was the working maximum number of characters.
From there, it was a matter of golfing (and not-golfing, like having a two-letter variable name) to get the program nicely divisible by four. Note that we have a small comment (everything following the `#`) to account for some missing elements, but I tried to keep the comment as small as possible.
[Answer]
## Haskell, ~~90~~ ~~75~~ 72 bytes
```
a[i]|d:n<-[[i|n<-i,n==a]|a<-i]=and[[i]<d,[d|i<-n]==n]--aadd,,,,:::::<=||
```
Each character appears 6 times. The input string is taken as a [singleton list](https://codegolf.meta.stackexchange.com/a/11884/34531).
[Try it online!](https://tio.run/##rY/XoppQFETf/Ypjb2CvCPbeeyOoBw4qFlDAjv@Sb8mPGUxu7k3eMy9775n9MGsNlS2/271ekBYYDREiidO0oOlDwESKgowG9ZWhoIh0nyERRiNNIHGRoSiRwXEIEcJ0EW@RlKa99lAQAQWQZDAAgONA5iECinSSOR4sZWkPFBUJop4dTmpPlesiMEkX8eODAKZ3IguiCiwAAtr0v3qZmI8@krrmZaDyigo4qPDKP02@iV@xQry77OGhARy/Gnmg53CSeSegdV@XCeoyYZ@H0Q/8wAiB0f@XybIchxDPL5er1aft7xiH82VPyESysvDQnuo232CGm2aVms1DDmijUmFpAjH/Za11Q5PaAJjjnNHcAX3bckEoe0t6fMZPqxHZdu6eo3ayaN/sgtc9sscrvKXRTPTlXDbnVaeVuqsUiLK3guhZ@ba1Ndu1Jku4J3woc3WfszpdKISLvgZ690jMep6VpZib5rFHK3MUU8EC2Spexo5E@nZi3Peo94COg7wO8AfsC5Fl35R/3dznznaWkR6XCSMiNIdVZ54JuGaNs6PwrLFRKc1sZf48SvF9X3GUqGhVQrgCa9wYLF72CddgWiovYuowubr5r2Oy521lok01a39y4GQfWurYZDc5PMy0x7Oxrfrb2OaAR7q70qBunpMzXy43rbU7y3zAqjjXPJ5tdE9@MXVEgtcYPlIX0SLJ0D3G2q37vdxcU47QY78IxiuaQrsLadstafoNwBh@fDe8fgI "Haskell – Try It Online")
For reference, old versions:
75 bytes, each char 5 times
```
n(l)|d<-[[0|n<-l,n==a]|a<-l]=and[[0]<d!!0,all(==d!!0)d]--an!((())),,,0<[]||
```
[Try it online!](https://tio.run/##rZJXlqJQEIbfXcWlTaBgzoI555w4qJdgxIsCZtxLr2U21kNP6OkFTD399VXVw3dObaC2l2T54wPhMmGINMWyPgPRlEwihoGcAc3IMRCJJudoEcN8JJRlnGE@IyFyFAURhuM4QRAkSfpoljOMjwPcIsAAUbFYAKAooEpQBJpyVgUJrFTlADRd3CJztpb0vIJ0CekaSKUYcFS3SAcegP4cKvpGUoEuaToQoCZpJj3AYxPgvxY9iACsicx6g2a9kV8N5gd@gEGA@b9BnhcEUZSk1Wq9/sL@LjZarPrbbCSnbp/GS98Xmtxo16ox80UIhw4mHVamkPRfN0YvNK0PgTUuYNYuGDhWy4R2sGUmF@q8HtMdQn6NO6mScycHbwfRGa9KtmYrOVDzubxXn1UbrnIgyt@LyLP27esbvmdPlSlP@FgRGj6iNltqCRd7C/QfkZj9Mq8oMTcrkc929oTSwSLdLl0neDJzP3PuR9R7FE/DginwV@yfIs9/Wn7rha/Md1eRvpANi4nQAtaIAhdwzZsXvPiq81Elw@1V6TJOSwNfaZysGrXE9gbscSxYuh6SruGsXFnG9FFqffffJnTf285GW3rO@RLA2TmyNcipPD0@razHs3OsB/vY7khFenJ52LAu6Lkvn5/VO91VIWDXiI1E5Zq9sx@lT@LWi4VPzBXZFBW6J2Sn/XhUWhsGDz0Py2C8amisu5hx3FNvvwU4y493y//80p8 "Haskell – Try It Online")
90 bytes, each char 3 times:
```
a x|h:u<-[sum[1|d<-x,not(d/=c)]|c<-x],"  \"\\&,../1::>acdlmmnosst">[]=h>1&&all(not.(/=h))u
```
[Try it online!](https://tio.run/##tZJXmqJQEIXfXcU1gyKKqU1gzjkHGvUSFJWgBLN7mbXMxnqY1NMbmPNU51Sdh//7SoT6QZCkjw8Irk8xZWYCtG7KNPHkM4ErpqgGwgdJDmWenOUZzAHAu@P93YPheJBIpSjI8ZIsK6quGw6KZkiRIjweKEmI1cSRICmiqPkhw50CSMCrNhsAgQDQBMgDXTU1TgAbTZWBbvA7xdptBaOoKoagGDqgKBIctZ1iABzAP0XVEAUNGIJuAA7qgm6lMjy2AfLrEIcooK3IkgNacmCfxk4AAtghsBNfQpblOJ4XhM1mu/2Mib59stoMd/l4Qds9ni/jUGozk32nQS5XUQR6yGxMnUOMuIjPQXTeHANnkrM7@2Dk2axTuuzKzc4BczvN9FDpNe1RFe9eilxl3pusC652Jz3SioVi0FjUW75q@I29lRV8Gzo0RXbgpqoBPHasca0Q2lis9ZSPvoaH93jCfV7W1ISfFrBHN39SspFyplu5zJB07mYy/vtb8MifxiUL4C/YP0SW/Un5xXOfM9vfxIdcPsanoivYQEtM2Ldsn5Hyq8m@qTnmoAnnaVYYhSrTdP3ZSO2uwJ20RyoXOe0bL6q1dcKYUNsbcZ1lhsFu/q1jFLwvDpjeiauFzaX58eGkcXzv2Y4Oif0xEB9I1XHLucosQ8Xiotnrb0pht46KQqDQHpiEkj3xu6A9diIvikvVoH@G9br3e60jkkj0Ia8jyfpTp/3lnOdGOX4DMLbv32z/8Wl/AA "Haskell – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), ~~108~~ ~~104~~ ~~92~~ 88 bytes
-12 bytes thanks to [Rod](https://codegolf.stackexchange.com/users/47120/rod)  
-4 bytes thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)
```
s=input();c=s.count;print[all(c(s[[]>[1]])==c(o)>1. for o in s)];aaafffillpprrtuu>1.>1.;
```
[Try it online!](https://tio.run/##PU/XroJQEHz3K44d7NgVsffeG0GlKoqAB7D77V7U5CabnS2TyYx603eKHH6zCscTNpvtrRGirBo6guIsoQVYxZB1XIWirJO0JCEsopEklSUxikIJgkUUNIsFgKBAoABRBhpK4TRNC4IgSpKqQqgbhkkwC3@b4gFNh6KKoJbLTpR4MIYGn7YAoMPbBwDgrzwLPk4sn5nlVR1UetUKhAr8ERjI04f/5@@m0ppmsXwtWr7WAQEk@shwdPqn9a/6tpneaJvFBCsGMGClgRX7rgzDshzH84Kw3ZoHbGCdroWRWIgXofh4vvRDuUNN990msVpHEdpF5GLKgvZhl91zGF20JsCeYq32ARi7hE1aOzry87Pf2M4yfVR6zfrZqnsvRa5Hzp1q8I5OFx/DUrEU1JeNtqcWTjC3ihzYhg6tHTN0Zmv@QEyts@0Q2lxutLSHvIZH93jSeV7VlaSX5H2PXuEk5yKVTK96mSN4/mZQ3nsiqHKnSfmT5ZvHDPRBhvmfWLMzAyE@YgsxLh1d0020TIU9q84ZqbxaTELJUwfIn2c5fhyqzvDGs5kWr8CZskaqlyPumSxr9U1Sn2a3N@w6z4yCvUKiqxfdLxYY7qmj7VtIC/VhJwOBvWs7PiT3qj8@lGqTtn2dWYVKpWWrPxDKYaeG7nh/sTM0MDl34sSgNXYiLrJDgbR37uv37vd6d0cg0cdxE0k1nhrpreRdt6ztDw "Python 2 – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 12 bytes
```
q&=sqt&=tsvv
```
The input is a string enclosed in single quotes. Single quotes in the string are escaped by duplicating.
The output is a non-empty matrix, which is [truthy](https://codegolf.stackexchange.com/a/95057/36398) if it doesn't contains zeros, and is [falsy](https://codegolf.stackexchange.com/a/95057/36398) if it contains at least a zero.
[Try it online!](https://tio.run/##y00syfn/v1DNtriwRM22pLis7P9/dWSuOgA) Or [verify all test cases](https://tio.run/##bU/XruJADH2/XzERZaiB0HvvvVdRUiYkEJKQTIBQvp0L7MtKu0eyfexjW/aRxtJrC/6FDXAKSZIXQZTQ62RP6ydsT2P9fH5lIdYMLJjwCXla0k24@nTrmJY5WuPAH9H3lQBGOv4pjf67XtRViTY9QDV04TOFAFYAqyEaIyDKvCiLbyIpigoMGYvSu6YaGIg6QFeBNnSMuBf8@zD4A@k3voGgAAUIGhDUN2UYluU4hHh@t3sXqD4x2fBDMR8paOL98cSHUns12Xca6fUm5KDt6WxYmdMe6iI8BqF5cwwscZaw9MHIzm8T@tGam529xm6a6jml57SXqUC4l4LXIwdhvI6s7U5ypBULRR9e1FuuaiDKmGWZ3PkPTYEZ2DJVLxlWa2zL72wstnrCtbwGhrdIzHZe15SYe4k8927@JGeD5VS3cpk5kjnTWLlvUZ/KncalzzcfY5jPU1/Gvj3T5yNDNh/mEqEN3XCWVgHXun12lJ9NJqrkVgcNnadZNPJXpsn6o5EQr8AWJ4KVyzHpGi@qtW0MTzI7k7rOUkNfNx/t4AKETxYYEE6sLc9cmqt3y5Ik9/bd6BDbq97IQKqOW5ZNau0vFhfNXp8vBWy6U0DeQntgUHL2xIk@InxKX2SrotHumafXvd1qHSHtCN2P22C8/tCX7nLObmbgLw), including the standard truthiness/falsiness test for convenience.
### How it works
Statements marked with `(*)` are neither necessary nor harmful, and have been included only to make the source code non-discriminating.
```
q     % Implicit input. Convert chars to code points and subtract 1 from each (*)
&=    % Square matrix of all pairwise equality comparisons
s     % Sum of each column. Gives a row vector
q     % Subtract 1 from each value. An entry equal to 0 indicates the input string
      % is discriminating because some character appears only once
t     % Duplicate
&=    % Square matrix of all pairwise equality comparisons. An entry equal to 0
      % indicates the input string is discriminating because some character is
      % more repeated than some other
t     % Duplicate (*)
s     % Sum of each column (*) (all those sums will be positive if the previous
      % matrix doesn't contain zeros)
v     % Vertically concatenate the matrix and the vector of its column sums
v     % Vertically concatenate the resulting matrix with nothing (*)
      % Implicit display
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~87~~ 78 bytes
```
c=->m{y=m.chars;x=y.map{|d|y.count d}|[];x[-1]>1and not x[1]};->{pushrortpush}
```
26 characters repeated 3 times each
[Try it online!](https://tio.run/##rZHHsqJgEIX3PMVvjqCYFcWccw4UKkkxIEhQEHh273Wc7eymq6u@073p6nNkjTbeb6YA44JpFASE4SlZwfSCgQiUZFqsZSCMqN1UwNoWQWI6AaMkjlI3FtxEFegEStoYjJuSpvCyKKsf2m9JUxXgm8mayhs5H0RAzv97wBkGLpCHYaDyJwX8tspzQBE1meEAI7Ic5KR@yxn@0IECFDgo4EC/M00zDMty3OFwPH426Nix2B2mp3KqIp9My1YvtT65OA86he0u4ae8hWJSXFNh9Mlbk8S6OweuLONwjcHMe9jnFMFdWj1g7bjMjwJXeznCG77zNa4LrC/b5tz9ATaTq5VqRN20e8FmLE0b9RtyjF66PD3x4E0YSUotphcNdDZ7JRck9Nj0lcp4HtuWmAkRXNgclu@3YryeHzaeKz9WMjQy9EpHJPY@rzkhEuEohgemdbLAH8cZ4kTaEPTR0DeCBnVV/ibwtYOmPw58JfMBPT6kpkw5yeYSO6oTqJGx4Lb/8NftLp0WS@RF5h7LIjeLNpZY2@rkTjrwZB3xxlPAgvNNs7XPqAv8aKD6Kj@NDMvpgVrx2QzQfAt3L7y@riXTRSDI2XucXTJnCU5Nrs15z7XLb6PV6qY7Gh9qMY8S4Dm40p9o6K14Z08RR/JeeN7cokyFVuHR8PVqDfiCP2EK@3i2bSlEqF7yGvi//n//AA "Ruby – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/), `-p` 57 bytes
Each character appears 3 times. Only a single `1` doesn't do anything
12 bytes added to a basic 45 character solution to make in non-discriminating
```
s{.}[@m[@1{$&}+=$.].=g]eg;$\=s()(e@m;1)&&m[e(\sg+)\1+;]}{
```
[Try it online!](https://tio.run/##K0gtyjH9/7@4Wq822iE32sGwWkWtVttWRS9WzzY9NjXdWiXGtlhDUyPVIdfaUFNNLTc6VSOmOF1bM8ZQ2zq2tpoCrf/yC0oy8/OK/@sW/Nf1NdUzNNAzAAA "Perl 5 – Try It Online")
[Answer]
# [R](https://www.r-project.org/), 90 bytes
```
"?"=`u\164f8ToI\x6Et`;'!'=prod;!{y<-xtabs(~?readLines())}%in%{z<-y[1]}&z>T##&[]>~48bEfILpu
```
[Try it online!](https://tio.run/##K/r/X8leyTahNMbQzCTNIiTfM6bCzLUkwVpdUd22oCg/xVqxutJGt6IkMalYo86@KDUxxSczL7VYQ1OzVjUzT7W6yka3Mtowtlatyi5EWVktOtauzsQiyTXN06eglJZGAwA "R – Try It Online")
Outputs `TRUE` for a non-discriminating string, and `FALSE` for a discriminating string. I have written a lot of ugly code for challenges on this site, but I think this is the ugliest so far.
45 characters, used twice each (including a few in a comment). The previous best R answer was [116 bytes](https://codegolf.stackexchange.com/a/156994/86301), with 29 characters used 4 times each; I am posting this separately since it is substantially different.
The code is equivalent to
```
y = table(utf8ToInt(readLines()))
z = y[1]
all(y == z) & (z > 1)
```
which converts the input to a vector of integers, computes a contingency table `y` of the values, then checks that all counts in that table are equal to the first count, and that the first count is greater than 1.
The initial difficulty was in using only 2 pairs of brackets. This is achieved by redefining the unary functions `!` and `?` to be `utf8ToInt` and `prod` respectively. (I can't use `all` because I need the `a`). There are four assignments: two with `=` and two with `<-`. This means that the equality test between `y` and `z` cannot use `y==z` nor `y-z`; `y%in%z` comes to the rescue.
Defining these functions uses up all the possible quotes: two double quotes, two single quotes, and I'll need the two backticks in the next paragraph, so I had to resort to `readLines()` instead of `scan(,"")`. (The other options, such as `scan(,letters)` or `scan(,month.abb)` all used a precious `t` which I couldn't spare.)
At this point, I had most of the building blocks: `utf8ToInt`, `prod`, `table`, `readLines`, `%in%`. Three characters appear three times in those names: `ent`. First, I discovered that `table(foo)` is equivalent to `xtabs(~foo)`, saving the `e`. I can rescue the `n` and the `t` with the hex/octal code [trick](https://codegolf.stackexchange.com/a/191117/86301); the golfiest solution is to use `u\164f8ToI\x6Et` (in backticks) for `utf8ToInt`.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 153 bytes
```
f(h,a,c,f){{{{{{{char*o=f=h,*r;for(a=!h;*o;o++){for(c=!h,r=h;*r;c+=!(*r++^*o)){}f*=!!(c^!!h)*(!a+!(a^c));a=c;}(a^c^c^f^f^h)+o,a+r,o,o,+h^*r;(a=f);}}}}}}}
```
[Try it online!](https://tio.run/##zVHHtqJAFFyPXwH6VJIBsyLmnHMWhUbABApm5NsdnHect5gfmKpNdZ3bt6tPAZcIwOslIBLBEoAQUP0bQGJVTKEFWiIwlRIUFWFpWKIwhVJwHNXfBjANQqVNU6UATsMIpuI4gykoqhsCRsMwAhgYllAMgVkcRlgGoCjF0oAy3tqkYFJCcYVgcZVQTOISY@4yXxJQyvjG66KseUhE3nkgTEMtuuXXQV3LJwGx2skgD82sdm1mnclWAhIQDSUgDaUshsVijkB7di0j31fOJw2x9tTzSbrHZrLLhNWc@yUiVtbEj4ZJiIRgFoLJH4/jAOD51UoQRPHjkm14sBC663Qoo671p3Ha5urzwaZRoZlFAGEddDKojFmCvErPTmBc7UO2KIBtbajnEJYxbf@VGl1cZ3EYb6E7Y9hKFJybnf@2553R8uqr3qB6ajaT9Zwm5RpW9IW5e152i95tVeI69kTR5Q4eSqDmRSuTpRbDpjdf9xGK2C9MSYng0xWhN9NHOenPx5uF6wihUvfzHH@EPQf@2M998v@3hf8J@ClsJhfYnfZPY38Fx73b@TmCj@TaQqgL0kE@FliwFTQ392FM/YLkjSoXVlLzrbq6DJOrnrcwpMrPSmx9g@xR2F@47imsPymWlpHTICHeydso3vU00@HGKeM0AHR2Dr5qxHg3Pui2qdu9cYi9bWRzcIU6u2K/ZlvEGW82O6m22kLOZ9dQaeXK1DtnUk4e@bUHDh7pq/ylqCw@IlrNx6PUkGgkoO@X/mj5qU3xfMpxT7w/YLx@Aw "C (gcc) – Try It Online")
Returns address of string as truthy value, and zero as falsy.
```
f(
h,                              Address of string.
a,                              # instances of previous character
c,                              # instances of current character
f                               Return value
){{{{{{{                        
char*o=f=h,*r;                  Point o to string, while giving f a non-zero value.
for(a=!h;*o;o++){               Set previous char count to 0, and then traverse the string.
for(c=!h,r=h;*r;                Set current char count to 0 and r to string,
                                and start counting instances of current character.
c+=!(*r++^*o))                  Add to counter if current character matches.
{}                              Lower the amount of semi-colons
f*=                             Multiply (AND) return value with:
   !!(c^!!h)                    Is current count not 1? (Must be 2 or above.)
            *(!a+!(a^c));       AND, is previous count valid (meaning this is not the first
                                character counted), and matches current count?
a=c;}                           Previous count = current count.
(a^c^c^f^f^h)+o,a+r,o,o,+h^*r;  Spend surplus characters to make source code valid.
(a=f);}}}}}}}                   Return value.
```
[Answer]
## R, ~~132~~ 116 bytes
```
crudcardounenforceableuploads<-function(b){{pi&&pi[[1-!1]];;;"";{1<{f<<-table(strsplit(b,"",,,)[[1]])}}&&!!!sd(-f)}}
```
It doesn't contain any comments or superfluous strings, either, though this will probably be my only time in code golf calling a function `crudcardounenforceableuploads`. ~~There's probably a great anagram in there somewhere for the function name!~~Thanks to John Dvorak for pointing out a nice anagram solver, which I used for the name.
Character table:
```
- , ; ! " ( ) [ ] { } & < 1 a b c d e f i l n o p r s t u 
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
```
examples:
```
> crudcardounenforceableuploads("aaabbbccc")
[1] TRUE
> crudcardounenforceableuploads("aaabbbcc")
[1] FALSE
> crudcardounenforceableuploads("abc")
[1] FALSE
> crudcardounenforceableuploads("crudcardounenforceableuploads<-function(b){{pi&&pi[[1-!1]];;;\"\";{1<{f<<-table(strsplit(b,\"\",,,)[[1]])}}&&!!!sd(-f)}}")
[1] TRUE
```
[Answer]
# BASH 144 bytes
```
grep -o .|sort|uniq -c|awk '{s=$1}{e[s]=1}END{print((s>1)*(length(e)==1))}##>>>#|'#wwwuuutrqqqppooNNNnlllkkkiihhhggEEEDDDcccaaa1***{}[[[]]]...--''
```
This line of code takes an stdin string as input. "grep -o ." puts each character on a new line. "uniq -c" counts each chacter's usage. The awk script creates an array with each usage as a different element, and outputs true when there is only 1 array index and the value is at least 2. Each character is used 4 times, so this source returns true 
[Answer]
# [Stax](https://github.com/tomtheisen/stax), ~~26~~ ~~24~~ 18 bytes
```
:u{m*_{y#m:u_hy#h*
```
[Try it online!](https://staxlang.xyz/#c=%3Au%7Bm*_%7By%23m%3Au_hy%23h*&i=%3Au%7Bm*_%7By%23m%3Au_hy%23h*%0Aaaaa%0Aaa%211+1+%21a+%211%0Aaabbccddeeffgg%0A1Q%21V_fSiA6Bri%7B%7C%7DtkDM%5DVjNJ%3D%5E_4%28a%26%3D%3F5oYa%2C1wh%7CR4YKU+%239c%21%23Q+T%26f%60%3Asm%24%40Xv-ugW%3CP%29l%7DWP%3EF%27jl3xmd%279Ie%24MN%3BTrCBC%2FtZIL*G27byEn.g0kKhbR%25%3EG-.5pHcL0%29JZ%60s%3A*%5Bx2Sz68%25v%5EHo8%2B%5Be%2C%7BOAqn%3F3E%3COFwX%28%3B%40yu%5D%2Bz7%2FpdqUD%0Aa%0Aabbaabb%0Aabc%0AbQf6ScA5d%3A4_aJ%29D%5D2*%5EMv%28E%7DKb7o%40%5DkrevW%3FeT0FW%3BI%7CJ%3Aix+%259%213Fwm%3B*UZGH%608tV%3Egy1xX%3CS%2FOA7NtB%27%7Dc+u%27V%24L%2CYlYp%7B%23%5B..j%26gTk8jp-6RlGUL%23_%3C%5E0CCZKPQfD2%25s%29he-BMRu1n%3Fqdi%2F%215q%3Dwn%24ora%2BX%2CPOzzHNh%3D%284%7Bm%6039I%7Cs%5B%2BE%40%26y%3E&a=1&m=2)
~~Shortest solution so far that only uses printable ASCIIs~~ Beaten by MATL.
Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...
## Explanation
`:u{m*` produces some garbage that does not affect the output.
```
_{y#m:u_hy#h*
_{y#m           map each character to its number of occurences in the string
     :u         all counts are equal (result 1)
       _hy#     get the count of appearance for the first character
           h    halve it and take the floor, so that 1 becomes 0(result 2)
            *   multiply the two results
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip), ~~22~~ 18 bytes
```
^1>=Y^aNaYMNy=My>1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgwYKlpSVpuhab4gztbCPjEv0SI339Km19K-0MIRJQ-W3RSpgqlGKhsgA)
### Explanation
Each character occurs twice.
```
^1>=Y^aNaYMNy=My>1
      a             First command-line argument (a string)
     ^              Split into a list of characters
       Na           Count occurrences of each character in a
    Y               Yank the result into y
^1>=                No-op: compare with [1]
          MNy       Minimum of y
             =      is equal to
              My    Maximum of y
                >1  which is also greater than one
         Y          No-op: yank that result 
                    Autoprint the result of the last expression
```
---
Alternate 18-byters:
```
Y^!1Y^aNaMNy=My!=1
Y_<=1Y_NaMa1<Ny=My
```
[Answer]
# SmileBASIC, ~~164~~ ~~152~~ ~~148~~ 140 bytes
```
DeF M(X)DIM W[#R]WHILE""<X
INC w[ASC(x)]X[n]=""wEND
FOR F=e#TO--nOT-LEN(W)U=w[F]H=H||U&&U<MAx(W)neXT-!!!AASSS#&&Oxx||CCLL<<wIM#
RETURN!H
enD
```
35 different characters, repeated 4 times each.
No comments were used (but the expression after `neXT` is never actually evaluated)
Script to check answers:
```
//javascript is a convenient language that I love using!
var input=document.getElementById("input");
var button=document.getElementById("button");
var output=document.getElementById("output");
button.onclick=function(){
  var text=input.value;
  var freqs={};
  for(var i=0;i<text.length;i++){
    var letter=text.charAt(i);
    if (freqs[letter]==undefined) freqs[letter]=0
    freqs[letter]++
  }
  sorted=Object.keys(freqs).sort(function(a,b){return freqs[b]-freqs[a]})
  var out="";
  var min=Infinity,max=0;
  for (var i in sorted) {
    var letter=sorted[i];
    var count=freqs[letter];
    if(count<min)min=count;
    if(count>max)max=count;
    out+="\n"+letter+":"+count;
  }
  output.textContent="min:"+min+"\nmax:"+max+"\nunique:"+sorted.length+"\nlength:"+text.length+out;
}
```
```
<textarea id="input" placeholder="code here"></textarea>
<button id="button"butt>count</button>
<pre id="output">...</pre>
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), ~~168~~ 90 bytes
The output will be empty if false, or non-empty if true.
```
***???;;;;```!!$$$$MMMMOOOO..1111ssss222{{{{\^^^^
s;{O`.
M!*\`^((.)\2(?!\2))*$
(.)(?!\1)
```
[**Try it online**](https://tio.run/##K0otycxL/P9fS0vL3t7eGggSEhIUFVWAwBcI/IFAT88QCIqBwMjIqBoIYuKAgIur2LraP0GPy1dRKyYhTkNDTzPGSMNeMcZIU1NLhQvIBXEMNbloaTYA)
### Core program (39 bytes)
```
s;{O`.
M!*\`^((.)\2(?!\2))*$
(.)(?!\1)
```
### Explanation
The entire core program is in a silent loop. The first stage sorts the input. The second stage will print the current string if it consists of successive pairs of different characters. The third stage removes the last occurrence of every character (removing one of each character in the string).
About the junk at the top: the order is important. In addition to needing to be syntactically valid, a semicolon must be after the asterisks and before the backticks, so long as `*` is in the config string, in order for it to not print.
[Answer]
# [CoffeeScript 1](http://coffeescript.org/), ~~96~~ ~~93~~ 90 bytes
```
(q,a=q.split(h).length-1for h in[q][0])->a.every (w,s,pplitnggffoorsvvyy)->w>1&&a[0&10]==w
```
[Try it online!](https://tio.run/##tVJZc6JAGHz3V4zEKEREiIk33kc0xhxeiSwq4IAoMggIYsxvdyHZqt3sw77tVM3011NdX1dXtYRkGUJLMlXDPsvsGd@RArujLENTbXxFUBrUFXuVYGRkghVQdW7HczRPJEoCBR1oegB3SYs0ArmuKLKMkGk5juf5CrfERKMCR0cZmmdZ91wIOYAF2P9zwAohyXfAOZV0fu1Xf@/nAwPVNwBV0xQ8SjbRFujQBQNo4w5BhCSkW0iDlIYUHBtCywaCIqi6jxJawjzAiMJ3jYxjIA4c/2JEkMwf5GBTIYR8Sn9XS0ToHw52QCTBgtaXD4cJ/sHIkI9hBjAgLIAw88VFUZKWSwhlWVGCH@Y5PJ7LA7Warpnq@@nD3jQe@PG632Vn8xtciLLlW/QmkIy7Or3cvN2PwEVOCl88g2FUXuStbaTy6iT2yqT4RGgfk6dSK7bWUoftMpbrwMhDvzA067V60p52elft64zoNXVKoTf3K/HlstROULfGndSjie50YeWvuMP14JjOXjqzO5SNc5B8f6zu9HKqWXxsua94oeLt@fgxkzSWu1HjM83nI4pBqq9RCkB8ltMDqXq7zN/MhS7R4K@vZg8O3vy4FzOowm9M6EzKcEi3JoXOqZtXD@AyF0613G3hajRt3y2y9rikeMzhtThIPlYzfbsW@5DAPjaO9Mg37c14v@Aoah1Vhpvs2kikX7T2qHcxL87oen16//QsN64vLWIFE7WHlz2jl3dLNRm@3bGuHkGmEH8lnx6Px7v@isVv3reLVK5zsrh4sxL1ShhPbQUDxxHBlv7qyg8sKAgK2vLjj74ggiDOPwE "CoffeeScript 1 – Try It Online")
Started from [my ES6 answer](https://codegolf.stackexchange.com/questions/156967/non-discriminating-programming/156981#156981) but walked back to using `Array.every`. ~~32~~ ~~31~~ 30 tokens @ 3 each
[Answer]
# [Whispers v2](https://github.com/cairdcoinheringaahing/Whispers), ~~1750~~\* 1305 bytes
```
> 1
> InputAll
>> ∪2
>> #2
>> #3
>> 4÷5
>> ⌊6⌋
>> L⋅7
>> Each 8 3
>> 9ᴺ
>> 2ᴺ
>> 10=11
>> 6>1
>> 12⋅13
>> Output 14
           ###########################00000000000000000000000000001111111111111111111112222222222222222222222222333333333333333333333333334444444444444444444444444445555555555555555555555555555666666666666666666666666666777777777777777777777777777788888888888888888888888888889999999999999999999999999999============================AAAAAAAAAAAAAAAAAAAAAAAAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEIIIIIIIIIIIIIIIIIIIIIIIIIIIILLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOOOOOOOOOaaaaaaaaaaaaaaaaaaaaaaaaaaaacccccccccccccccccccccccccccchhhhhhhhhhhhhhhhhhhhhhhhhhhhlllllllllllllllllllllllllllnnnnnnnnnnnnnnnnnnnnnnnnnnnnpppppppppppppppppppppppppppttttttttttttttttttttttttttuuuuuuuuuuuuuuuuuuuuuuuuuu÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺᴺ∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪∪⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌊⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋⌋
```
[Try it online!](https://tio.run/##7dRNCoJAFAfwvacY6ALO@L1owIWLIPAMIoGBiKTSCYRQT9I6ENp6kryIORZE1HuLmHbz88@8B84wq3nHZF/ku0PBpokTqnGyyfKq9NNU45yMpzMTdfVYDbGaQ28t/7rGHrtWtNuxrR3RBFGcEJcs@7zb5Soqe1aqrykVjc2XQtl8ii5bw6qc7yTU1N6RlxVMR9BvGMQAmTALYcMchIvwEGuEjwgQG8QWESIiRIxIECksQ@SwElSBhv63b34jcjO/XPlpa8npmj@klR41GtVoVKNRjUY1Gj9yBw "Whispers v2 – Try It Online")
\* Golfs made while explaining it. You can see the original [here](https://github.com/cairdcoinheringaahing/5-solutions/blob/9b575896ed946c2a86efca74588dd8d834fb2096/3.md)
Interesting task, fairly boring restriction.
Unfortunately, due to the fact that every line must start with either `>>` or `>`, this forces the number of each character to be disproportionately large. Luckily, Whispers ignores every line that doesn't match one of its regexes, all of which require the line to begin with `>`. Therefore we just have a large character dump at the end of the program. In addition to this, Whispers, being designed for mathematical operations, struggles when applied to a [array-manipulation](/questions/tagged/array-manipulation "show questions tagged 'array-manipulation'") question. Overall, this means that the task is interesting to attempt, but the source code requirements are a bit boring.
If we strip all the unnecessary characters from the program, we end up with
```
> 1
> InputAll
>> ∪2
>> #2
>> #3
>> 4÷5
>> ⌊6⌋
>> L⋅7
>> Each 8 3
>> 9ᴺ
>> 2ᴺ
>> 10=11
>> 6>1
>> 12⋅13
>> Output 14
```
[Try it online!](https://tio.run/##K8/ILC5ILSo2@v/fTsGQy07BM6@gtMQxJ4fLzk7hUccqIxCtDCGNQaTJ4e2mYLmeLrNHPd0gps@j7lZzEMM1MTlDwUIBrM7y4ZZdINoIShsa2BoaghhmdmDK0AioyxCs1L@0BGingqHJ//@JiUlJyckA "Whispers v2 – Try It Online")
which is the part of the code we're actually interested in.
## How *that* works
Here we conduct two key tests: the count of each is the same and the counts are greater than **1**. However, the code for these two tests are shared between them, so a complete walkthrough of the program is a more effective method of explaining this.
We start with the shared code:
```
> InputAll
>> ∪2
>> #2
>> #3
>> 4÷5
```
Here, we take the input and store it on line **2** (`> InputAll`). We then create a `∪`nique version of that string (i.e. the input without duplicate characters). With our next two lines, we take the length of the untouched input (`>> #2`) and the number of unique characters in the input (`>> #3`). Finally, we divide the former by the latter.
Why? Let's have a look at the two inputs of `aabbcc` and `abbaabb`. With the first string, the division becomes **6÷3 = 2**, and the second results in **7÷2 = 3.5**. For non-discriminating strings, the result of this division is **a)** An integer and **b)** Greater than **1**. Unfortunately, this also applies to some non-discriminating strings, such as `abbccc`, so we have to perform one more test.
```
>> ⌊6⌋
>> L⋅7
>> Each 8 3
>> 9ᴺ
>> 2ᴺ
>> 10=11
```
Note: line **6** is the result of the division.
First, we take the floor of the division, because Python strings cannot be repeated a float number of times. Then we reach our `Each` statement:
```
>> L⋅7
>> Each 8 3
```
**3** is a reference to line **3**, which contains our deduplicated input characters, so we map line **8** (`>> L⋅7`) over this list. Line **8** multiplies the character being iterated over by the floor of our division (`>> ⌊6⌋`). This creates an array of the deduplicated characters, repeated **n** times.
The results from our two previous strings, `aabbcc` and `abbaabb`, along with `abcabc`, would be `aabbcc`, `aaabbb` and `aabbcc` respectively. We can see that the first and last two are identical to their inputs, just with the letters shuffled around, whereas the middle one isn't (it has one less `b`). Therefore, we simply sort both the input and this new string, before comparing for equality:
```
>> 9ᴺ
>> 2ᴺ
>> 10=11
```
Finally, we need to check that the number of characters in the string is **2** or greater. Luckily, the division we performed earlier will always result in a value greater than **1** if a character repeats more than once, meaning we just need to assert that line **6** is greater than 1:
```
>> 6>1
```
Now we have two booleans, one for each test. They both need to be true, so we perform a logical AND (boolean multiplication) with `>> 12⋅13`, before finally outputting the final result.
[Answer]
# Pyth, 30 bytes
```
  "&8<MQSlqr{"&q1lJ{hMrSz8<1hJ
```
Leading spaces necessary.
[Try it online!](http://pyth.herokuapp.com/?code=++%22%268%3CMQSlqr%7B%22%26q1lJ%7BhMrSz8%3C1hJ&input=%22hithere%22&test_suite=1&test_suite_input=aa%211+1+%21a+%211%0Aabbaabb%0Aabc%0A++%22%268%3CMQSlqr%7B%22%26q1lJ%7BhMrSQ8%3C1hJ&debug=0)
The actual program is just `&q1lJ{hMrSz8<1hJ`. I just prepended the string `"&8<MQSlqr{"` to make it non-discriminating. But to make the string not print itself, I had to add a space, so I added 2 spaces.
```
&q1lJ{hMrSz8<1hJ
 q1l                (1 == len(
    J{                  J = deduplicate(
      hM                  map(lambda a: a[0],
        r  8                length_encode(
         Sz                   sorted(input())
                            )
                          )
                        )
                    )
&                     and
            <1hJ    (1 < J[0])
```
`length_encode` here (`r <any> 8`) takes a sequence and outputs the length of each run of the same character, ex. `"aaabbcc"` becomes `[[3, "a"], [2, "b"], [2, "c"]]`.
So this takes the input, sorts it to put in length encode, and takes the first element of each list in the resulting list (e.g. the earlier example would become `[3, 2, 2]`). This gives a count of how many times characters occur. Then it's deduplicated (the earlier example would become `[3, 2]`), and J is set to that.
Then it checks if the length is 1, i.e. there is only 1 unique number of times a character occurs, and if that is > 1, i.e. >= 2.
There might be a built-in to replace `rSz8` or `hMrSz8` but I can't find one.
]