[Question]
  [
**Explanation:**
Last year in math class, on homework we would occasionally get these extremely simple, although equally annoying questions called diamond puzzles. These were basically questions where we would be given a sum, and a product then were asked to find the two numbers which when multiplied give the product, and when added give the sum. These drove me crazy, since the only way I knew how to solve them (in Algebra I) was to just list the factors of the product then see which ones added to make the sum. (Since I didn't know how to use Quadratics at the time) Not to mention, they weren't exactly challenging math. However, It just occured to me that I should have just written a program. So that is your challenge today! Write a program that can solve a diamond puzzle. 
**Examples**
[![enter image description here](https://i.stack.imgur.com/bbHkK.png)](https://i.stack.imgur.com/bbHkK.png)
Apologies for the blurry image, its the best I could find. Also, ignore the numbers in bubbles.The top of the diamond is the product, the bottom is the sum, the right and left are the two numbers.
Answers are as follows: (These are also your test cases)
1. 9, -7
2. -2, -1
3. 5, 8
4. -9, -9
**Rules:**
* You may not use any pre-defined functions or classes which accomplish this for you.
* Your code must be a complete program, or function which either returns or prints the answers once it finds them
* The input is the sum and product, which are inputted as a function parameters or user input
**Specifications:**
* Assume that the two numbers, the sum, and the product will always be an integer.
* The two answers will both be between -127 to 127.
* Your input will be two integers (Sum and Product).
Remember this is code-golf, so shortest byte count wins. Please title your answer with the standard ##Language Name, Byte Count
Edit:
Also, Doorknob pointed out that this is essentially "factor a quadratic of form x^2 + bx + c,". That is another way to think about and approach this challenge. :D 
  
[Answer]
# [Jelly](http://github.com/DennisMitchell/jelly), ~~15~~ ~~11~~ 10 bytes
```
Hð+,_ðH²_½
```
[Try it online!](http://jelly.tryitonline.net/#code=SMOwKyxfw7BIwrJfwr0&input=&args=MTM+NDA)
The following binary code works with [this version](https://github.com/DennisMitchell/jelly/tree/7ee6838e9979ef33cab5085f413b3b6855e1ba46) of the Jelly interpreter.
```
0000000: 48 98 2b 2c 5f 98 48 8a 5f 90  H.+,_.H._.
```
### Idea
This is based on the fact that
![formula](https://i.stack.imgur.com/OIyER.png)
### Code
```
Hð+,_ðH²_½    Left input: s -- Right input: p
 ð   ð        This is a link fork. We define three links, call the left and right
              link with the input as arguments, then the middle link with the
              results as arguments.
H             Left link, dyadic. Arguments: s p
H             Halve the left input.
     ðH²_½    Right link, dyadic. Arguments: s p
      H       Halve the left input.
       ²      Square the result.
        _     Hook; subtract the right input from the result.
         ½    Apply square root to the difference.
 ð+,_         Middle link, dyadic. Arguments: (results of the previous links)
  +           Compute the sum of the results.
    _         Compute the difference of the results.
   ,          Pair.
```
[Answer]
# [Unicorn](https://github.com/vihanb/Unicorn), ~~4650~~ ~~2982~~ ~~1874~~ 1546
```
[ ✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨ 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 ( 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 ✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨ 🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 ( ) ) 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 2 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 ✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨ 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 ( 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 ✨✨✨✨✨✨✨ 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 4 🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 ✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨ 🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤 🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄🦄 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 ( ) ) 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈 🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤🌤 ✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨ ]
```
Now with goats, rainbows, and sparkles!
Hopefully shorter than Java.
---
Uses a custom [encoding](https://github.com/vihanb/Unicorn/blob/master/encoding.txt) which can be applied with `ApplyEncoding`
## Explanation
How does this work??? With the magic of unicorns (and a little code).
Unicorn is compiled into JavaScript
Each section is separated by a space, and each section represents a character in the JavaScript code.
If the section contains unicorns, the section's character is the section's length, converted to a char code (e.g. 32 unicorns would be a space)
If the section contains goats, the section's length is doubled and then converted to a char code.
---
If the program's special chars don't show, here's a picture:
[![enter image description here](https://i.stack.imgur.com/frQ8h.png)](https://i.stack.imgur.com/frQ8h.png)
---
This is non competing because Unicorn was made after this challenge was posted.
[Answer]
# JavaScript ES6, ~~45~~ ~~39~~ 37\* bytes
```
(q,p)=>[x=p/2+Math.sqrt(p*p/4-q),p-x]
```
\* Thanks to Dennis!
[Answer]
# dc, 16
```
?ddd*?4*-v+2/p-p
```
Reads sum then product from separate lines of STDIN. -ve numbers must be entered with an underscore instead of a minus sign. e.g.
```
$ { echo 2; echo _63; } | dc -e'?ddd*?4*-v+2/p-p'
9
-7
$ 
```
### Explanation:
Same basic quadratic solution for `sum = a + b` and `product = a * b`. This calculates solution `a` as:
```
a = [ sum + √( sum² - 4 * product ) ] / 2
```
And calculates solution `b` as:
```
b = sum - a
```
### Expanded:
```
?                   # push sum to stack
 ddd                # duplicate 3 times (total 4 copies)
    *               # sum squared
     ?              # push product to stack
      4*            # multiply by 4
        -           # subtract (4 * product) from (sum squared)
         v          # take square root of (sum squared) - (4 * product)
          +         # add sum to square root of (sum squared) - (4 * product)
           2/       # divide by 2 to give solution a
             p      # print with newline and without pop
              -     # subtract solution a from sum to give solution b
               p    # print with newline and without pop
```
Dividing by 2 is done late to prevent loss precision. It is possible to divide by 2 earlier, but this requires fractional precision which needs more characters.
[Answer]
# TeaScript, 22 bytes ~~30 31~~
```
[d=y/2+$s(y*y/4-x),y-d
```
Not *that* bad. Would be much shorter if I could of gotten some golfing features finished earlier such as ~~unicorn~~ unicode shortcuts 
[Try it online](http://vihan.org/p/TeaScript/#?code=%22%5B(y%2B(d%3D$s(y*y-4*x)))%2F2,(y-d)%2F2%5D%22&inputs=%5B%22-63%22,%222%22%5D&opts=%7B%22int%22:true,%22ar%22:false,%22debug%22:false%7D)
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 33 bytes
```
-100:100t!2$t+i=bb*i=&2#2$1fv101-
```
Outputs the two numbers in two different lines. If no solution exists it produces no output. If several solutions exist it produces only the pair of numbers corresponding to one solution.
### Example
The following was run in Octave with the [current GitHub commit](https://github.com/lmendo/MATL/commit/77a5eba228ccedec8ac0d58d0f1842aba03858cc) of the compiler.
```
>> matl -r '-100:100t!2$t+i=bb*i=&2#2$1fv101-'
> 2
> -63
 9
-7
```
### Explanation
```
-100:100           % row vector -100, -99, ..., 100
t!                 % duplicate and transpose into column vector
2$t                % duplicate the two vectors
+                  % sum with singleton expansion (all combinations)
i=                 % does it equal input? Produces logical matrix
bb                 % move the two vectors to top
*                  % multiply with singleton expansion (all combinations)
i=                 % does it equal input? Produces logical matrix
&                  % logical "and"
2#2$1f             % find row and column of the first "true" value in logical matrix
v101-              % concatenate vertically and subtract 101
```
[Answer]
# Julia, ~~46~~ ~~44~~ 32 bytes
```
f(b,c)=(x=b+√(b^2-4c))/2,b-x/2
```
An function f that takes the sum and then the product.
My first Julia answer. @AlexA., you should be proud of me.
Thanks @Dennis and @Alex A. for all the help. I got to cross out the 44. :P
[Answer]
# Pyth, ~~21~~ 18 bytes
*Saved 3 bytes thanks to @Dennis*
```
,J/+@-^Q2*4E2Q2-QJ
```
[Test suite](http://pyth.herokuapp.com/?code=%2CJ%2F%2B%40-%5EQ2*4E2Q2-QJ&input=2%2C+3&test_suite=1&test_suite_input=2%0A-63%0A-3%0A2%0A13%0A40%0A-18%0A81&debug=0&input_size=2)
My second Pyth program ever, so it can probably be golfed with built-ins. Suggestions are welcome!
### How it works
```
,J/+@-^Q2*4E2Q2-QJ   Implicit: Q = first line of input
,                    Create and output a list of these items:
 J                     Set variable J to the result of these operations:
      ^Q2                Square Q.
     -   *4E             Subtract 4*(next line of input).
    @       2            Take the square root.
   +         Q           Add Q.
  /           2          Divide by 2.
                       The list is currently [J].
               -QJ     Push Q-J; the list is now [J, Q-J].
                     EOF; list is sent to output.
```
(This explanation may not be 100% correct; I'm not very familiar with Pyth.)
Note that `/` is integer division. By replacing it with `c`, we could make this work with non-integer inputs as well.
[Answer]
# Python 3, ~~49~~ 44 bytes
There are probably some ways to golf this down even further, but this looks pretty good as is.
```
def f(s,p):s/=2;d=(s*s-p)**.5;return s+d,s-d
```
[Answer]
# Java , 82 (69 λ) bytes with quadratic formula (127 (114 λ) bytes brute-force)
*Brute-Force: (Vanilla, Java 7)*
```
int[] n(int s,int p){for(int a=-100;a<=100;a++)for(int b=-100;b<=100;b++) if(a+b==s&&a*b==p)return new int[]{a,b};return null;}
```
*λ-enhanced: (Java 8)*
```
(s,p)->{for(int a=-100;a<=100;a++)for(int b=-100;b<=100;b++) if(a+b==s&&a*b==p)return new int[]{a,b};return null;}
```
Assign lambda to `java.util.function.BiFunction<Integer, Integer, int[]>` and call `apply()`.
Plain old brute-force approach. Just the working function is here, and since Java can't return multiple values, we return a 2-element `int` array with the required numbers. 
The full brute-force approach based program can be found [here on ideone.com](http://ideone.com/7WcQwq), with λ version here.
Golfing this involved removing all unnecessary braces.
*Ungolfed:*
```
int[] n(int s,int p){//sum and product as function parameters,in that order
    for(int a=-100;a<=100;a++){//iterate first no. from -100 to 100
        for(int b=-100;b<=100;b++){//iterate second no. from -100 to 100
            //if the 2 nos. satisfy the diamond-puzzle condition, 
            //pack them in an int array and return them
            if(a+b==s&&a*b==p)return new int[]{a,b};}
     }//if no such pair exists, return null
return null;}
```
*Quadratic Approach: (Vanilla, Java 7)*
```
int[] n(int s,int p){int x=s+(int)Math.sqrt(s*s-4*p);return new int[]{x/2,s-x/2};}
```
*λ-enhanced: (Java 8)*
 (s,p)->{int x=s+(int)Math.sqrt(s\*s-4\*p);return new int[]{x/2,s-x/2};}
(Usage as for brute-force λ above).
Parameters and return criteria are the same as the brute-force solution above.
Uses the good old quadratic formula used by almost all other answers here, and cannot be golfed down much further unless someone helps me out here. It's pretty clear so I'm not including an ungolfed version.
The full quadratic approach based program is here on [ideone.com](http://ideone.com/8bXCr0), with λ version here.
[Answer]
# [convey](http://xn--wxa.land/convey/), 52 bytes
```
{?~1
4*"v
 v*#2
`-.v
*%2v
.10-`
v0 v"
"-v,<
>,+
 2%}
```
[Try it online!](https://xn--wxa.land/convey/run.html#eyJjIjoiez9+MVxuNCpcInZcbiB2KiMyXG5gLS52XG4qJTJ2XG4uMTAtYFxudjAgdlwiXG5cIi12LDxcbj4sK1xuIDIlfSIsInYiOjEsImkiOiIyIC0xNSJ9)
Golfed version of [this answer](https://codegolf.stackexchange.com/a/221123/56656).
[![Running on 2 -15](https://i.stack.imgur.com/nIVkI.gif)](https://i.stack.imgur.com/nIVkI.gif)
[Answer]
## [Japt](http://ethproductions.github.io/japt/), ~~28~~ ~~22~~ ~~21~~ 20 bytes
```
[X=V/2+(V²/4-U ¬V-X]
```
Input is made in the form of `-63 2`.
Explanation:
* `U` and `V` are the two inputs (`-63` and `2` in the first case)
* `²` squares the number
* `q` extracts the square root
[Answer]
# APL, ~~27~~ 21 bytes
```
h(+,-).5*⍨⊣-⍨h×h←.5×⊢
```
This is a dyadic function train that accepts integers on the right and left and returns an array. To call it, assign it to a variable.
Ungolfed:
```
                h←.5×⊢       ⍝ Define a train h for halving the input
              h×             ⍝ b^2/4
          ⊣-⍨                ⍝ b^2/4 - c
      .5*⍨                   ⍝ sqrt(b^2/4 - c)
h(+,-)                       ⍝ Return the halved pair
```
[Try it online](http://tryapl.org/?a=f%u2190h%28+%2C-%29.5*%u2368%u22A3-%u2368h%D7h%u2190.5%D7%u22A2%20%u22C4%20%AF63%20f%202%20%u22C4%202%20f%20%AF3%20%u22C4%2040%20f%2013%20%u22C4%2081%20f%20%AF18&run)
Saved 6 bytes thanks to Dennis!
[Answer]
# CJam, 18 bytes
```
q~2d/_2#@-mq_2$+p-
```
[Try it online!](http://cjam.tryitonline.net/#code=cX4yZC9fMiNALW1xXzIkK3At&input=NDAgMTM)
### How it works
```
q~                  e# Read an evaluate all input. STACK: product sum
  2d/               e# Divide the sum by 2.0.
     _              e# Push a copy of the result.
      2#            e# Square the copy.
        @-          e# Rotate the product on top and subtract it from the square.
          mq        e# Apply square root.
            _2$     e# Push copies of the root and the halved sum.
               +p   e# Add and print.
                 -  e# Subtract the originals.
```
[Answer]
**MathCAD 15. 38 Bytes**
[![enter image description here](https://i.stack.imgur.com/nREAG.png)](https://i.stack.imgur.com/nREAG.png)
With a mathematical formula, programming in MathCAD is easy. The language is even designed to handle complex numbers with ease. However there are shorter languages that can solve the problem.
[Answer]
# 𝔼𝕊𝕄𝕚𝕟, 21 chars / 30 bytes
```
[x=í/2+√ í²/4-î⦆,í-x]
```
`[Try it here (Firefox only).](http://molarmanful.github.io/ESMin/interpreter.html?eval=true&input=%5B-63%2C2%5D&code=%5Bx%3D%C3%AD%2F2%2B%E2%88%9A%20%C3%AD%C2%B2%2F4-%C3%AE%E2%A6%86%2C%C3%AD-x%5D)`
Meh. This should be visual enough for y'all to get the idea; however, if you must, `î = input1, í = input2`.
[Answer]
# [J](http://jsoftware.com/), 12 bytes
```
1-@>@{p.@,&1
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/DXUd7ByqC/QcdNQM/2typSZn5CtYKsSbK@haKaQpxJsZKxhBBOONFOINIaJAljFE0ELBFCJkYqBgCBWLtwQhsKiFIVCPxX8A "J – Try It Online")
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 14 bytesSBCS
```
⊣(⊢,-)(⊢×-)⍣¯1
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT////1HXYo1HXYt0dDVB1OHpupqPehcfWm/4P@1R24RHvX2P@qZ6@j/qaj603vhR20QgLzjIGUiGeHgG/3/UO1ehuDRXIU2hoCg/hcsYyDDiOrTeCEgfWm9mzGVoZA5kGgAA "APL (Dyalog Unicode) – Try It Online")
A tacit function whose left arg is the sum and the right is the product. Finds one solution to the quadratic equation using the built-in numerical solver, and then gives both solutions based on the result.
The "power operator" `f⍣n` runs the function `f` `n` times, but if `n` is negative, runs the *inverse* of `f` `-n` times. The inverse of `f` is, in the numerical point of view, equivalent to solving the equation `f x = y` with a given value of `y`. Dyadic form `a(f⍣n)y` solves `(a f x) = y`.
### How it works
```
⊣(⊢,-)(⊢×-)⍣¯1  ⍝ left: sum s, right: product p
      (⊢×-)     ⍝ A function that, when left-bound with s, computes x*(s-x)
           ⍣¯1  ⍝ Find one solution to x*(s-x)=p, i.e. x^2-sx+p=0
⊣(   )          ⍝ With s as left and x as right arg,
  ⊢,-           ⍝ Give (x,s-x)
```
[Answer]
## [wx](https://github.com/w-golflang/w) `d`, ~~14~~ 12 bytes
Just [W](https://github.com/a-ee/w) with a few instructions added.
```
○Äπ√akû▀╧Θ°v
```
Decompressed:
```
a*S4*-Q+2/:aS-
```
[Answer]
## PHP, 62 bytes
```
<?=($x=($p=$_GET[p])/2+sqrt($p*$p/4-$q=$_GET[q]))." ".($p-$x);
```
This could be pretty long but being full-featured PHP web-"program". Accepts the arguments via the "get" request.
[Demo](http://justachat.freevar.com/diamonds.php?q=-63&p=2).
[Answer]
# TI-BASIC, 20 bytes
Takes `Q` from `Ans`, and `P` from `Prompt`. Call like `P:prgmNAME`.
```
Prompt P
P/2+√(P²/4-Ans
{Ans,P-Ans
```
]