Arranging pins on a microchip Since no one has posted a "good quality question" recently, i feel it is my duty to...

Task:


  You work at an electronics company in the design department. The designers that work with you have asked you to make a program that will calculate the optimum configuration of pins on a microchip they are designing. With your ninja golfing skills, you are confident you can handle it.


Your company also has these requirements for each chip:


The chips your company makes are known as TQFP, they have pins on each edge, but none in the middle.
Each chip must be square, and have the same number of pins on each side.
If the chip doesn't have enough pins to be square, pins will be added.

Extra pins are either a ground or voltage supply pin.
Half are ground, half are voltage supply.
If there is an odd number of extra pins, the odd one out is ground



Your program will take input as a single integer, which is the minimum number of pins the manufacturing needs. You will then output 4 integers:


The number of pins (total)
The number of pins per side
The number of ground pins added
The number of voltage supply pins added


Rules:


You can use any language
This is code-golf, to the shortest answer in bytes wins
Bonus: -50 for printing an ASCII chip:


Something like this:

 +++++
 +   +
 +   +
 +   +
 +++++


(For example with an input of 20)
Python: 64 53 46 bytes
x=input()
m=x+3&amp;~3
t=m-x
print m,m/4,t-t/2,t/2

Second Third attempt seems pretty minimal. Thanks for the help.
First attempt seems sort of long, we'll see what an hour or two of mulling it over will shave off of the byte count. Could also probably make it shorter if a function is allowed instead of program.
&gt; python chip.py
9
(12, 3, 2, 1)

Also made a version that prints chips, seems like the -50 isn't worth it in python. Total score of 102-50=52.
x=input()
m=x+3&amp;~3
n=m/4
t=m-x
s=['+'*-~n]
print'\n'.join(s+['+'+' '*~-n+'+']*~-n+s+[`m,n,t-t/2,t/2`])

Example:
&gt; python chip.py
9
++++
+  +
+  +
++++
(12, 3, 2, 1)