Simultaneous equations With equations that have more than one unknown, simultaneous equations can be used in solving for them. This challenge will only deal with linear equations with two unknowns, to make things as elementary as possible.

The program should take two lines of input from stdin, each containing a linear equation with two unknowns (x and y). Output should be in the form x=&lt;x-value&gt;, y=&lt;y-value&gt;, where the angled bracketed text should be replaced by the appropriate value. Non-integer values can be outputted in either decimal point form rounded to at least 3 decimal places or until the fraction terminates (eg. 1/2 would be 0.5 not 0.500), or simplest (improper, not mixed) fraction form (as all results will be rational). If the equations are unsolvable (ie are parallel but not equivalent), output Unsolvable. If the equations are equivalent and would therefore have an infinite number of solutions, output Degenerate.

The use of external modules is not allowed. Also, any library functions that solve equations (this applies especially to Mathematica) are not allowed.

Each equation in the input will be in general form, with no whitespace. If a coefficent or the constant term is 0, the whole term will not appear, and if a coefficient is ±1, only the pronumeral will appear.

Test cases:

Input:                 Input:                 Input:                 Input:
7x+4y-8=0              4x+3y+32=0             x-y=0                  2x+5y-1=0
x-8y+1=0               x-4=0                  x-y+5=0                2x+5y-1=0
Output:                Output:                Output:                Output:
x=1, y=1/4 (or 0.25)   x=4, y=-16             Unsolvable             Degenerate


This is once again code-golf, so shortest code wins.
Python 3, 250

I reuse the code for parsing the input for each of the "coefficients" of x, y, and "=" by putting it into a string and multiplying it the right number of times.

For the "coefficient of =" case to work (absence means 0, not 1, like for x and y), the last "0" of the input has to be thrown away (and then magic takes over...).
Makes heavy use of short circuiting in logic expressions, and of False==0.

Uses Python's feature of leaving off trailing zeros of floats (finding out if the solution is an integer is still necessary).

exec((("R=input()[:-1];"+"*_,R=I,*_=R.split(%r);%s=R!=I and int(I in'+-'and I+'1'or I);"*3)*2)%tuple("xXyY=Cxxyy=c"))
d,u,v=X*y-Y*x,C*y-c*Y,X*c-x*C
print(d and"x=%s, y=%s"%(u%d and-u/d or-u//d,v%d and-v/d or-v//d)or"UDnesgoelnvearbaltee"[u==v==0::2])