Find all Number Relations Inspired by: Find an Unrelated Number



Challenge

Given two positive integers as input, output the mathematical operations that can be used on those inputs to generate every number from 1 to n inclusive where n is the smallest prime greater than the sum of the two inputs. If the number cannot be generated using the list of mathematical operations below, the output for that number should indicate that it is "unrelated".

For example, for the inputs 2 and 3, n=7 so one valid output would be
Subtraction, Modulus, Bitwise OR, Unrelated, Addition, Multiplication, Unrelated
(see Output section below for clarification on valid outputs)

(If Erik the Outgolfer's answer is valid, the last term will always be unrelated.)

Operations that must be considered are:

Addition        (a + b)
Subtraction     (a - b) and (b - a)
Multiplication  (a * b)
Division        (a / b) and (b / a)
Modulus         (a % b) and (b % a)
Bitwise OR      (a | b)
Bitwise XOR     (a ^ b)
Bitwise AND     (a &amp; b)


In cases where an operation would lead to a non-integer (such as 2/3), always floor. So 2/3=0 and 3/2=1.

Exponentiation is not included because it is never required. a**b and b**a will always be larger than 2(a+b)-2 (which is (probably) the largest possible n) except for the cases a=1|b=1 or a=b=2. The cases a=b=1 and a=b=2 have valid solutions that do not use exponents: * and /|U+U, respectively. For the rest of the cases where a=1,b&gt;1, a**b=1 which can also be found with a%b and b**a=b which can also be found with b*a.

Concatenation is not included because it was shown to always be larger than n.

Input

2 positive integers.
Standard I/O methods are accepted. Standard loopholes are forbidden.
You can assume the input will always be within a valid range for your given language. 

Output

A list or array of the mathematical operations that can be used with the inputs to generate every number from 1 to n inclusive where n is the smallest prime larger than the sum of the two inputs. (You do not need to output the value of n.)

Output can be in any format valid for your language so long as it is clearly understood. For instance, it can be an array where each value is a separate operation, a string with a delimiter between each value, or even just a solid string where each character is a different value.

You can use any character(s) so long as each possible result has a unique representation. For instance, +-*/%|^&amp;U will work and so will 123456789, UNRELATID, and CODEgolf!. You are advised to include a legend or explanation of how the output can be read.

If more than one operation can be used to generate a given number, you may output any one of them. Do not output all of them.

Testcases

Input  |   n  |   Example Valid Output
-----------------------------------------
2, 3   |   7  |   Subtraction, Modulus, Bitwise OR, Unrelated, Addition, Multiplication, Unrelated
2, 3   |   7  |   -%|U+*U
2, 3   |   7  |   2579139
1, 1   |   3  |   [*,+,U]
6, 6   |  13  |   ["/","U","U","U","U","&amp;","U","U","U","U","U","+","U"]
6,12   |  19  |   U/U&amp;U-UUU^UUU|UUU+U
12,6   |  19  |   U/U&amp;U-UUU^UUU|UUU+U
7,11   |  19  |   /U&amp;-UU%UUUU^UU|UU+U
7,15   |  23  |   %/UUUU%-UUUUUU|UUUUUU+U  (2nd value is a floor divide)


(I can easily add more test cases if someone finds an interesting one.)

I think the test case outputs are all valid but I've been known to mistakes. Please tell me if you spot one.


Scoring

This is code-golf so fewest bytes wins!
JavaScript (ES6), 134 bytes
(a,b)=&gt;eval(&quot;for(t=a+b,i=0;i=i&lt;t;)for(++t;t%++i;);for(q=n='';n++&lt;t;)[...'+-*/%^&amp;|&gt;'].every(o=&gt;n^eval(a+(p=o)+b)&amp;&amp;n^eval(b+o+a)),q+=p&quot;)

Using the standard symbols for operations in JavaScript, except for unrelated that is &gt;
Less golfed
(a,b)=&gt;
{
  // find the smallest prime greater than the sum of a and b
  for (t = a + b, i = 0; i &lt; t; )
    for(i=1, ++t; t % ++i; );

  // loop from 1 to t
  // accumulate output in q
  for(q='', n = 0; n++ &lt; t; )
  {
    // try all binary operators
    // to avoid error in 'eval', I need a binary operator for 'unrelated', so I choose '&gt;'
    [...'+-*/%^&amp;|&gt;'].every( // every terminates early if the result is false
      o =&gt; (
        p = o,
        n ^ eval(a+o+b) &amp;&amp; n ^ eval(b+o+a)
      )
      // using xor to check for equality, the result is cast to integer
      // eventually flooring the division result
    )
    q += p
  }
  return q
}

Test


F=
(a,b)=&gt;eval("for(t=a+b,i=0;i=i&lt;t;)for(++t;t%++i;);for(q=n='';n++&lt;t;)[...'+-*/%^&amp;|&gt;'].every(o=&gt;n^eval(a+(p=o)+b)&amp;&amp;n^eval(b+o+a)),q+=p")

console.log(2,3,F(2,3))
console.log(1,1,F(1,1))
console.log(6,6,F(6,6))
console.log(6,12,F(6,12))
console.log(7,15,F(7,15))