[Question]
  [
Submit a well-formed program or function with **usual I/O rules** which satisfy the input, output, and algorithm conditions below. **Shortest submission (in bytes) wins.** As always, standard loopholes are forbidden.
*In short:* Two distinct 8-bit integer inputs must produce two 8-bit integer outputs so that all four numbers are distinct, i.e., not equal.
# Input Conditions
Two distinct 8-bit integers, *a* and *b,* both of which are in 8-bit signed (or unsigned at your discretion) format. 
# Output Conditions
Two 8-bit integers, *c* and *d,* which are in the same format as the input (signed or unsigned), such that *a,* *b,* *c,* and *d* are distinct, i.e., no two of them are equal to each other.
# Algorithm Conditions
1. The algorithm must halt for all possible valid inputs.
	* Valid inputs are those where *a* and *b* are distinct. When *a* and *b* are equal, the behaviour of the algorithm is unspecified.
2. The algorithm must be deterministic.
	* Running the algorithm with the same input must produce the same output.
3. The algorithm must satisfy the *output conditions* for all valid inputs.
# Verification
There are two ways to verify your algorithm.
1. Brute force: explicitly check the program for all valid input combinations.
2. Prove/show, by analysis, that a clash is impossible (preferred).
# FAQ
1. What if my programming language doesn't provide 8-bit integers?
2. What if my programming language doesn't support fixed-width integers?
	* Only the range of the outputs matter; internal computations may be in any precision. If the outputs can be rounded/scaled to the required integral range, then the programming language is good to go.
---
# Edits
**Edit 1:** Thank you for the submissions! I am glad to see so many creative solutions! Initially, I planned to restrict the algorithm to one-to-one mapping (i.e., invertible), however, decided against it to make the problem simpler. Looking at the enthusiastic response, I will consider submitting a second code golf with the one-to-one mapping requirement.
  
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~35~~ ~~31~~ ~~27~~ 23 bytes
*-4 bytes thanks to Arnauld and Kevin Cruijssen*
*-4 bytes thanks to xnor*
```
a=>b=>[c=3^a&1^b&2,c^4]
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i7J1i462dY4LlHNMC5JzUgnOc4k9n9yfl5xfk6qXk5@ukaahoEmEGlac6GKGmIVBao1wqoWJPofAA "JavaScript (Node.js) – Try It Online")
Explanation:
Takes the flipped 1 bit of the first number, and adds the flipped 2 bit of the second number, guaranteeing a number different from both inputs in the 2 least significant bits. Outputs this number, and 4 added to this number
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 20 bytes
```
{grep(.none,^4)[^2]}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/Or0otUBDLy8/L1UnzkQzOs4otvZ/cWKlQppCtKGOUaw1F5RjZqJjaYngGugYIjhGOsax1v8B "Perl 6 – Try It Online")
Outputs the first two numbers from the range 0 to 3 that aren't in the input.
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 69 bytes
```
,+[->+>+>+<<<],[->>->-<<<]++>>>[[-]<<<->.>>]<+<+>[[-]<<->.>]<+<[->.<]
```
[Try it online!](https://tio.run/##LYpBCoAwDAQftE1fsOxHSg5VEUToQfD9MQHZy8yw2zOvdb77HdEwTKiR9JYikxUDksYwTzF1yQniLxXK89/pEcf8AA "brainfuck – Try It Online")
My solution takes the first input and counts it upwards and prints the first two numbers unless they are the second input.
So if the first input is A and the second input is B the output will be:  
A+2, A+3 if B = A+1 or  
A+1, A+3 if B = A+2 or  
A+1, A+2 else
```
This initializes position 1,2,3 of the band as the first input incremented by 1
,[->>->-<<<]
This substracts the second input from positions 2 and 3.
++
Set position 0 to 2, counting the numbers still to print
The band now reads: (2) a+1 a-b+1 a-b+1
>>>[[-]<<<->.>>]
If position 3 is not 0, print out position 1 and decrement position 0
<+<+>
Increment the band in position 1 and 2
[[-]<<->.>]
If position 2 is not 0, print out position 1 and derement position 0
<+<[->.<]
Increment at position 1, Position 0 is now either 1 or 0. If it is 1 print position 1 one more time. ```
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~9~~ 5 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
∞IK2£
```
I/O as a pair of integers.
[Try it online](https://tio.run/##yy9OTMpM/f//Ucc8T2@jQ4v//4821DGOBQA) or [verify some more test cases](https://tio.run/##ASsA1P9vc2FiaWX/OcOdw6PKksOLX312ecKpPyIg4oaSICI//@KInnlLMsKj/yz/).
**Explanation:**
```
∞      # Push an infinite positive list [1,2,3,...]
 IK    # Remove the values of the input-pair
   2£  # Only leave the first two values
       # (after which the result is output implicitly)
```
[Answer]
# [Haskell](https://www.haskell.org/), 32 bytes
```
a#b=take 2[i|i<-[1..],a/=i,b/=i]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P1E5ybYkMTtVwSg6sybTRjfaUE8vVidR3zZTJwlIxP7PTczMU7BVKCjKzCtRUFEwVjb6DwA "Haskell – Try It Online") We pick the first two positive integers that aren't input numbers.
[Answer]
# JavaScript (ES6), ~~32 27~~ 26 bytes
Takes input as `(x)(y)`.
```
x=>y=>[x^=k=y^x^1?1:2,y^k]
```
[Try it online!](https://tio.run/##VY9NboMwEIX3nOJFihJbcaKm6qrUdMcFskmEgoKIqSgIV5i0niKfnZq0NMpmft73PON5zz4zk7flR7du9FkNhRysjEhGiU1lJSm16fZ1@/woKK2OQ6FbpitIdO1FCVhfPYQ@vfhs49iXqxVHHwCjk34x3TBNGCgLZjGToEkAkr3A4egfecQZ8fBP99ZGfWGnOpZYARK4GvnGlN9qnPF0mwHkujG6Vptav7FTnJW1Oo@/AZv31ol5T45jHY3tfmwPjp/@NwHX64qsNmrSXDBFF7jA88Xibsdyd8lzZcxsycPhBw "JavaScript (Node.js) – Try It Online")
[Answer]
# [Octave](https://www.gnu.org/software/octave/), ~~28~~ 22 bytes
```
@(x)setxor(1:4,x)(1:2)
```
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999Bo0KzOLWkIr9Iw9DKRKdCE0gZaf5P04g2VjCK1fwPAA)
### Explanation
Anonymous function that outputs the first 2 entries from the sorted symmetric difference between `[1 2 3 4]` and the input.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~27~~ 10 bytes
```
Ｉ…⁻Ｅ⁴ιＥ²Ｎ²
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5sRhIVCbnpDpn5Bdo@GbmlRZr@CYWaJjoKGRq6iiAmEY6Cp55BaUlfqW5SalFGpqaQHEjIGn9/7@hgsF/3bIcAA "Charcoal – Try It Online") Link is to verbose version of code. Uses the same set difference algorithm as everyone else. Less boring 27-byte version actually tries to produce interesting outputs for all inputs:
```
ＮθＮηＩ﹪⁺÷¹²⁸⊕¬﹪⁻θη¹²⁸⟦θη⟧²⁵⁶
```
[Try it online!](https://tio.run/##TYqxDsIgFEV3v4LxkeBQoo2moy4MbbobBwQSSOjDUujv43MxTveek2O8zibp2JrCdy1TXV4uw8qHwz974jkHLHDTW4Ex2RoTzLFuoLDcwx6sg05eBFNoslscFmdhSr90DEjtKpjnglHIOe3jy0868tyTGFrrrpL1p3bc4wc "Charcoal – Try It Online") Link is to verbose version of code. Takes unsigned integers. Explanation: Flips the top bits of the values, unless this would exchange them, in which case adds 64 (modulo 256) instead.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 32 bytes
port of @Jo King's answer
```
Complement[Range@4,{##}][[;;2]]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2773zk/tyAnNTc1ryQ6KDEvPdXBRKdaWbk2Njra2tooNlbtf0BRZl6JgkN6tKGOUSwXnGekY4LMNUCRNLMEyf7/DwA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 27 bytes
```
lambda s:[*{0,1,2,3}-s][:2]
```
[Try it online!](https://tio.run/##K6gsycjPM/6fpmCrEPM/JzE3KSVRodgqWqvaQMdQx0jHuFa3ODbayij2f0FRZl6JRppGtbGOWa2m5n8A "Python 3 – Try It Online") The input is a set `s` with the integers. We build the set `{0, 1, 2, 3, 4, 5, 6, 7, 8}` and then perform set subtraction to remove, from that set, any input numbers. We then convert to a list and extract two elements.
*Thanks Surculose for saving me 2!*
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 8 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
Hõ kU ¯2
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=SPUga1UgrzI&input=WzEsOF0)
[Answer]
# [Python 3.8](https://docs.python.org/3.8/), ~~31~~ 29 bytes
Saved 2 bytes thanks to [xnor](https://codegolf.stackexchange.com/users/20260/xnor)!!! 
```
lambda x,y:(k:=~x&1|~y&2,k+4)
```
[Try it online!](https://tio.run/##ZY6xDoIwGIR3nuKHgbSxDiIaQ1JHXkAHiDpUaZWAhRRI2iC8OhYc3e6/u//L1aZ9VXJ7qNUkgMJ1Ktn7njHQxESoiOio/c1nNH5AilWIp6qwpbPquCMqBRpyCYrJJ0fBbo8jB2bX/LmQC9AuNbOEhKRUIMvH82WTkkvU8BZdrEdsesPYpeHShVrlskXCi1le8mzB93ogvRlgfYQ@sTIdvIUEy7aYlQ13LLUqLOH37p26x4M3jevh6Qs "Python 3.8 (pre-release) – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 5 bytes
```
>2-Uy
```
[Try it online!](https://tio.run/##K6gsyfj/385IN7Ty//9oAx3jWAA "Pyth – Try It Online")
# Explanation
```
    y # Repeat the input
   U  # Generate a length range: [0 .. 3]
  -   # Difference with implicit input
>2    # Slice out the last 2 items of the resulting list
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~36~~ ~~34~~ 28 bytes
Saved ~~2~~ 8 bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)!!! 
```
f(x,y){x=(~y&2|~x&1)*257+4;}
```
[Try it online!](https://tio.run/##VVDBbsIwFLvnKwxSUbIGDSrYDl048gO7tNIuKCUQaesm2KREbfj17nVtGFziZ8d@saLnB627znAnvWic4hc/y9qLmy3FQ7Z@Tld56D52tuaiYbb@xhEKy5yZzxPvqSO6yAleCJ0xNKapQMOAaPGDxY8WmqIDsPQuJgo@CiRRpCgpM1TKb2VS6SpBtn661ctBf7zTKa5UgbYFYdmjH7kfeUH4/y7wdaJlhk@3O/u@r/r@SCqZVJhvhuGtnkrqJAtZXnvh70cWkQYWz8ACswb8KK6LX3@03p/PE9pD@dD9Ag "C (gcc) – Try It Online")
Uses [Paul Mutser](https://codegolf.stackexchange.com/users/86374/paul-mutser)'s [formula](https://codegolf.stackexchange.com/a/201603/9481).  
Returns the two 16-bit values in a 32-bit `int` since there are no tuples *&c* in C.
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + Core utilities, 29 bytes
```
seq 4|egrep -v $1\|$2|head -2
```
[Try it online!](https://tio.run/##S0oszvj/vzi1UMGkJjW9KLVAQbdMQcUwpkbFqCYjNTFFQdfo////hv@NAA "Bash – Try It Online")
Input is passed in two arguments, and the output is printed to stdout.
This prints the first two positive integers that aren't either of the two arguments.
[Answer]
# [Erlang (escript)](http://erlang.org/doc/man/escript.html), 43 bytes
Outputs the first two numbers from the range 0 to 3 that aren't in the input.
```
f(A)->lists:sublist(lists:seq(0,3)--A,1,2).
```
[Try it online!](https://tio.run/##NctBCoAgFATQfSf5wjfUdi6CziEuLCw@lJUaHd8MavdmmPFxdWHhPk2RjlyaMsPAeL9Sykmna3wBX/InCOwY5wNKVKwtm6MAxtY97fqOlD2YGYxAYRlWyB8C1d9U2Hp9AA "Erlang (escript) – Try It Online")
[Answer]
# [W](https://github.com/A-ee/w), 5 [bytes](https://github.com/A-ee/w/wiki/Code-Page)
Takes input as a pair of integers.
```
%G?←√
```
Uncompressed:
```
4k     Range from 1 to 4
  at   Trim out all items that appear in the input
    2< Take the first two items of the output list.
```
[Answer]
# [Io](http://iolanguage.org/), 46 bytes
Port of RGS's Python answer.
```
method(x,list(1,2,3,4)difference(x)slice(0,2))
```
[Try it online!](https://tio.run/##y8z/n6ZgZasQ8z83tSQjP0WjQicns7hEw1DHSMdYx0QzJTMtLbUoNS85VaNCszgnE0gb6Bhpav5P0wCrM9Ax09QsKMrMK8nJ@w8A "Io – Try It Online")
[Answer]
# [Alchemist](https://github.com/bforte/Alchemist), 60 bytes
```
_->In_x+In_y+2n
n+x+y->Out_z+z+Out_" "
x+0y->z+3y
y+0x->z+3x
```
[Try it online!](https://tio.run/##S8xJzkjNzSwu@f8/XtfOMy@@QhtIVGob5XHlaVdoV@ra@ZeWxFdpV2mDaCUFJa4KbQOgaJW2cSVXpbZBBZhZ8f@/AZchAA "Alchemist – Try It Online")
As with many answers here, prints the first two non-negative integers not in the input. Input is unsigned, since Alchemist doesn't have signed numbers.
I similarly can't just let a variable "go negative" after it hits zero, so I just let an input value `x` also exclude `x+4`, `x+8`, and so on. This has no effect on anything, provided both variables don't hit zero at the same time. Fortunately, if they ever become the same, both outputs will happen before they hit zero.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 22 bytes
```
->*a{([*6..9]-a)[0,2]}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf104rsVojWstMT88yVjdRM9pAxyi29n@BQlq0sY5Z7H8A "Ruby – Try It Online")
Same method as almost everybody.
]