[Question]
  [
In the fewest bytes possible, determine whether the two values given each match one of the following:
**First value**
```
2      string or integer - whichever you prefer
to     case insensitive
too    case insensitive
two    case insensitive
t0     case insensitive (t zero)
```
**Second value**
```
b      case insensitive
be     case insensitive
bee    case insensitive
b3     case insensitive
```
# Examples
```
2          'Bee'            true
'2'        'b'              true
'not to'   'be'             false
'that is'  'the question'   false
```
  
[Answer]
# [Shakespeare](https://github.com/drsam94/Spl), 4778 Bytes
*Note: this answer is not meant to be a serious competitor*
```
To Be or Not To Be, This is the Answer.
Hamlet, the main player in our story.
Horatio, Hamlet's guide through his internal struggles.
The Ghost, a handsome honest bold fair gentle king.
Claudius, the worthless usurper of the throne.
Ophelia, who Hamlet always writes two.
Polonius, the unfortunate third man caught between Hamlet and Claudius.
Brabantio, the greater.
Banquo, the lesser.
Emilia, the greater.
Egeus, the lesser.
Othello, the greater.
Orsino, the lesser.
Tybalt, the greater.
Titania, the lesser.
Valentine, who doubled is greater.
Viola, who doubled is lesser.
Act I: A simple question in so many words.
Scene I: Hamlet passes judgment over the cast.
[Enter Hamlet and Horatio]
Hamlet:
    Thou art the sum of a good healthy sunny warrior and a lovely day.
[Exit Horatio]
[Enter Claudius]
Hamlet:
    Thou art the sum of The Ghost and warm cute brave trustworthy hero.
[Exit Claudius]
[Enter Ophelia]
Hamlet:
    Thou art the sum of Claudius and a smooth spaceman.
[Exit Ophelia]
[Enter Polonius]
Hamlet:
    Thou art the sum of Ophelia and a plum.
[Exit Polonius]
[Enter Brabantio]
Hamlet:
    Thou art the sum of The Ghost and the sum of The Ghost and a rich kingdom.
[Exit Brabantio]
[Enter Banquo]
Hamlet:
    Thou art the sum of Brabantio and The Ghost.
[Exit Banquo]
[Enter Emilia]
Hamlet:
    Thou art the sum of Brabantio and the sum of joy and a gentle girl.
[Exit Emilia]
[Enter Egeus]
Hamlet:
    Thou art the sum of Emilia and The Ghost.
[Exit Egeus]
[Enter Othello]
Hamlet:
    Thou art the sum of Emilia and the sum of a cunning lover and the sweetest golden embroidered rose.
[Exit Othello]
[Enter Orsino]
Hamlet:
    Thou art the sum of Othello and The Ghost.
[Exit Orsino]
[Enter Tybalt]
Hamlet:
    Thou art the sum of Othello and the sum of happiness and fair fine heaven.
[Exit Tybalt]
[Enter Titania]
Hamlet:
    Thou art the sum of Tybalt and The Ghost.
[Exit Titania]
[Enter Valentine]
Hamlet:
    Thou art the sum of Tybalt and the sum of a happy day and a pony.
[Exit Valentine]
[Enter Viola]
Hamlet:
    Thou art the sum of Valentine and The Ghost.
[Exeunt]
Scene II: The beginning of Horatio's interrogation.
[Enter Hamlet and Horatio]
Hamlet:
Horatio:
    Open your mind.
    Art thou as good as Tybalt?  If so, let us proceed to Scene IV.
    Art thou as good as Titania?  If so, let us proceed to Scene IV.
    Art thou as good as Ophelia?  If not, let us proceed to Scene XII.
    
Scene III: Are we to?
Horatio:
    Open your mind.
    Art thou as good as The Ghost?  If so, let us proceed to Scene VII.
    Let us proceed to Scene XII.
Scene IV: Can we go further than t?
Horatio:
    Open your mind.
    Art thou as good as Claudius?  If so, let us proceed to Scene III.
    Art thou as good as Valentine?  If so, let us proceed to Scene VI.
    Art thou as good as Viola?  If so, let us proceed to Scene VI.
    Art thou as good as Othello?  If so, let us proceed to Scene V.
    Art thou as good as Orsino?  If not, let us proceed to Scene XII.
Scene V: Oone oor twoo?
Horatio:
    Open your mind.
    Art thou as good as The Ghost?  If so, let us proceed to Scene VII.
    Art thou as good as Othello?  If so, let us proceed to Scene III.
    Art thou as good as Orsino?  If so, let us proceed to Scene III.
    Let us proceed to Scene XII.
    
Scene VI: Hamlet desperately searches for whOo?.
Horatio:
    Open your mind.
    Art thou as good as Othello?  If so, let us proceed to Scene III.
    Art thou as good as Orsino?  If so, let us proceed to Scene III.
    Let us proceed to Scene XII.
Scene VII: Knowing to, what to do?
Horatio:
    Open your mind.
    Art thou as good as Brabantio?  If so, let us proceed to Scene VIII.
    Art thou as good as Banquo?  If not, let us proceed to Scene XII.
Scene VIII: Learning what to Bleive.
Horatio:
    Open your mind.
    Art thou as good as me?  If so, let us proceed to Scene XI.
    Art thou as good as Emilia?  If so, let us proceed to Scene X.
    Art thou as good as Egeus?  If so, let us proceed to Scene X.
    Art thou as good as Polonius?  If not, let us proceed to Scene XII.
Scene IX: The Eend is nigh?
Horatio:
    Open your mind.
    Art thou as good as me?  If so, let us proceed to Scene XI.
    Let us proceed to Scene XII.
Scene X: Wee may havee succeeeedeed.
Horatio:
    Open your mind.
    Art thou as good as Emilia?  If so, let us proceed to Scene IX.
    Art thou as good as Egeus?  If so, let us proceed to Scene IX.
    Art thou as good as me?  If not, let us proceed to Scene XII.
Scene XI: Hamlet is at peace.
Horatio:
    Thou art a beacon of happiness. 
    Let us proceed to Scene XIII
Scene XII: The demons have won.
Horatio:
    Thou art nothing.
Scene XIII: Hamlet opens up.
Horatio:
    Hamlet! Open your heart.
[Exeunt]
```
Outputs 0 if false, 1 if true.
This could easily be shorter (and if people really want me to, the word lengths could be cut down), but to do so would be a slap to the face of good ol' Will. I've always felt Horatio is the unsung hero of Hamlet, so I made sure that he was the one to deliver the intense monologue to Hamlet where Hamlet has to ultimately prove that he is as good as Horatio (who represents the newline).
The code itself is pretty simple. All of the characters sans Hamlet are ascii values (In order:`newline,space,0,2,3,B,b,E,e,O,o,T,t,V,v`) and then the code is a simple state machine (specifically, a [DFA](https://en.wikipedia.org/wiki/Deterministic_finite_automaton)) that transitions to `Scene XI` as an accept state and `Scene XII` as a reject state.
[![This is the basic one I worked off of](https://i.stack.imgur.com/R9sMX.jpg)](https://i.stack.imgur.com/R9sMX.jpg).
After making this, I just plugged it into Shakespeare, using the fact that I could drop down to the next state when they were numerically adjacent. I only tested it with the version of Shakespeare I linked in the title, but I believe we define a language by an implementation iirc.
[Answer]
# [Retina](http://github.com/mbuettner/retina), 28
* 1 byte saved thanks to @MartinBüttner.
Quite possibly my quickest ever code-golf answer - 9 minutes after OP.
Input parameters are comma-separated. Output is 1 for truthy and 0 for falsey.
```
i`^(2|t[ow]?o|t0),b(e?e?|3)$
```
[Try it online.](http://retina.tryitonline.net/#code=aWBeKDJ8dFtvd10_b3x0MCksYihlP2U_fDMpJA&input=dHdvLGI)
[Answer]
# Pyth, 34 bytes
```
.A}Lrw1c2c." Wô-WûÄæ­§Òé
}
```
Try it online: [Demonstration](http://pyth.herokuapp.com/?code=.A%7DLrw1c2c.%22+W%08%C3%B4-W%C3%BB%C2%9B%02%C3%84%C3%A6%C2%AD%C2%A7%C2%84%C3%92%C2%92%C2%94%C3%A9%0A%C2%8A%7D%C2%83&input=t0%0Abe&debug=0)
### Explanation:
```
          ."...   packed string, gets decoded to: "2 TO TOO TWO T0 B BE BEE B3"
         c        split by spaces
       c2         split into 2 lists: [['2', 'TO', 'TOO', 'TWO', 'T0'], 
                                       ['B', 'BE', 'BEE', 'B3']]
   L              for each list:
     w               read a line
    r 1              convert it to uppercase
  }                  and test if it is part of this list list
.A                test if both return true
```
[Answer]
# Pyth, 41 bytes
```
&xrw0c"2 to too two t0"dxrw0c"b be bee b3
```
[Try it here!](http://pyth.herokuapp.com/?code=%26xrw0c%222+to+too+two+t0%22dxrw0c%22b+be+bee+b3&input=t0%0Abee&test_suite=1&test_suite_input=2%0Abee%0A2%0Ab%0Anot+to%0Abe%0Athat+is%0Athe+question&debug=0&input_size=2)
Straightforward list lookup. Prints an empty list as falsy value and a non-empty list as truthy value.
Looking or a better way tho, I don't really like this one.
[Answer]
# Oracle SQL 11.2, 86 bytes
```
SELECT 1 FROM DUAL WHERE:1 IN('2','to','too','two','t0')AND:2 IN('b','be','bee','b3');
```
Returns one row for truthy and no row for falsey.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~39~~ 45 bytes
Code:
```
“2€„…«Œ† t0“' ¡)Ilrk\U“b€ïÍÝ b3“' ¡)Ilrk\>X>*
```
[Try it online!](http://05ab1e.tryitonline.net/#code=4oCcMuKCrOKAnuKApsKrxZLigKAgdDDigJwnIMKhKUlscmtcVeKAnGLigqzDr8ONw50gYjPigJwnIMKhKUlscmtcPlg-Kg&input=VE8KQmVl)
Uses CP-1252 encoding. Truthy is when a number is outputted and falsy is when nothing is outputted.
**Non-competing version (39 bytes)**, works with the newest version:
```
“2€„…«Œ† t0“ð¡)IlkU“b€ïÍÝ b3“ð¡)Ilk>X>*
```
[Answer]
## ES6, ~~56~~ ~~48~~ 45 bytes
```
(...a)=>/^(2|t0|t[wo]?o),b(ee?|3)?$/i.test(a)
```
Saved 5 bytes thanks to @user81655. Saved 3 bytes from some further optimisation. Saved another 3 bytes thanks to @Patrick Roberts.
`t[wo]?o` is the shortest regex I could think of to match all three homophones.
If it's permitted to pass the two values as a single parameter array, then the rest parameter can become a normal parameter, saving another 5 bytes.
[Answer]
# Perl 6, ~~45~~ 44 bytes
Thanks to the folks in IRC for helping me golf this down
```
{@_~~(~2|/:i^t[0|oo?|wo]$/,/:i^b[ee?|3]?$/)}
```
**usage**
```
> my &f = {@_~~(~2|/:i^t[0|oo?|wo]$/,/:i^b[ee?|3]?$/)}
-> *@_ { #`(Block|309960640) ... }
> f("2", "Bee")
True
> f("2", "b")
True
> f("not to", "be")
False
> f("that is", "the question")
False
```
**Non-competing alternative, 54 bytes** 
This is a nice alternative to the above if you think regexes are gross, but it is a tad longer. It could be golfed down a couple more bytes but since it's non-competing I'll leave it as is.
```
{@_».lc~~(qw<to too two t0 2>.any,<b be bee b3>.any)}
```
[Answer]
## Python 2.7, 133 bytes
```
def e(a, b):
        c, d = """2,too,to,t0,two""","""be,b,bee,b3"""
        return a.lower() in c and b.lower() in d
print e('2', 'bee')
```
Not sure if we're supposed to post solutions if there's a smaller version in the comments but here's my version in Python.
Edit: Without the function it's only 73 bytes (and that's not even near the best answers. Forgive me I'm new
```
a, b = "to", "bee"
print a in "2 too to t0 two" and b in "be b bee b3"
```
[Answer]
## Ruby, 53 55 52 bytes
```
f=->(a,b){/^(2|t[wo]?o|t0)$/i=~a&&/^b(e?e?|3)$/i=~b}
```
I'll be honest, this is my first attempt at trying to golf a problem.
Function call in the form of `f.call(firstValue, secondValue)`
`0` is Truthy, `nil` is Falsy.
Test it [Here](https://repl.it/BlrV/2)
[Answer]
# Japt, 36 bytes
```
!Uv r"2|t(0|wo|oo?)" «Vv r"b(e?e?|3)
```
Maybe I missed something, but this should work completely. [Test it online!](http://ethproductions.github.io/japt?v=master&code=IVV2IHIiMnx0KDB8d298b28/KSIgq1Z2IHIiYihlP2U/fDMp&input=IlR3byIgImJlIg==)
[Answer]
## Pyth, 39 bytes
*-3 bytes by @FryAmtheEggman*
```
.A.b}rN1cY\@Q,."0WÑ³5YYÅJB"."3EW´l¢ï
```
Try it [here](http://pyth.herokuapp.com/?code=.A.b%7DrN1cY%5C%40Q%2C.%220W%C3%91%1A%0F%C2%B35YY%C3%85JB%22.%223EW%C2%B4l%C2%A2%04%C3%AF&input=%5B%22too%22%2C%22b3%22%5D&test_suite=1&test_suite_input=%22too%22%2C%22b3%22%0A%22tOO%22%2C%22Bee%22%0A%222%22%2C%22be%22%0A%22to%22%2C%22be+or+not+to+be%22&debug=0).
[Answer]
# Python, ~~85~~ 83 bytes
@Manatwork saved me two bytes.
This is pretty brute force, I'll look into regex solutions next.
```
lambda a,b:a.lower()in'2 to too two t0'.split()and b.lower()in['b','be','bee','b3']
```
[Answer]
## PowerShell v3+, ~~74~~ 70 bytes
```
param($a,$b)+($a-in-split'2 to too two t0')*($b-in-split'b be bee b3')
```
Doesn't use regex. Takes two input, checks if the first one is [`-in`](https://technet.microsoft.com/en-us/library/hh847759.aspx) the array that's been dynamically created by the `-split` operator, converts that Boolean to an int with `+`, then multiplies that `*` with checking whether the second is `-in` the second array (which will automatically cast the Boolean as an int). This works because `x*y == x&y` if `x` and `y` can only be `1` or `0`.
PowerShell by default is case-insensitive, so we get that for free. Will output `0` or `1` for falsey/truthy, respectively. Requires v3 or newer for the `-in` operator.
Edit -- Saved 4 bytes by using unary -split
[Answer]
# Groovy, 52 bytes
```
f={x,y->"$x $y"==~"(?i)(2|t([wo]o?|0)) (b(ee?|3)?)"}
```
`==~` is a cool regex operator in groovy that checks for equality.
Tests:
[Regex101](https://regex101.com/r/vQ7wH8/2) test.
```
assert f('2', 'Bee') == true
assert f('2', 'b') == true
assert f('not to', 'be') == false
assert f('that is', 'the question') == false
```
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 32 ~~41~~ ~~43~~ bytes
```
jk'^(2|t[ow]?o|t0),b(e?e?|3)$'XX
```
Same approach as [@DigitalTrauma's Retina answer](https://codegolf.stackexchange.com/a/71699/36398).
Inputs are separated by a comma. Truthy output is a string with the two inputs lowercased; falsy is no output.
[**Try it online!**](http://matl.tryitonline.net/#code=amsnXigyfHRbb3ddP298dDApLGIoZT9lP3wzKSQnWFg&input=VDAsYjM)
```
j                                % input as a string
k                                % convert to lowercase
'^(2|t[ow]?o|t0),b(e?e?|3)$'     % regular expression to match the two inputs
XX                               % match regular expression
```
[Answer]
# C# 6, 132 bytes
```
bool t(string x,string y)=>new[]{"2","to","too","two","t0"}.Contains(x.ToLower())&&new[]{"b","be","bee","b3"}.Contains(y.ToLower());
```
Ungolfed version (Only slightly more readable):
```
bool t(string x, string y) => new[] { "2", "to", "too", "two", "t0" }.Contains(x.ToLower()) && new[] { "b", "be", "bee", "b3" }.Contains(y.ToLower());
```
[Answer]
# Python 2, 67 bytes
Uses Digital Trauma's regex. Input is a single string separated by a comma. Not sure if that format is allowed for input...
```
import re
f=lambda x:bool(re.match('^(2|t[ow]?o|t0),b(e?e?|3)$',x))
```
]