Is it a prime? w/o math Write a program or function in any language that tells if the input is a prime number.


The input is a string representing a natural number in base-10.
The output is one of the two strings "Prime" or "Not!!" which correctly identifies the input.
Arithmetic operators, bit-wise operators, numeric variables and constants, "math-stuff" in general, etc... are not allowed anywhere in your program.  You should use string operations to do all necessary "calculations".
You can compare string lengths (which are numbers) - but -10 to your score if you don't.
Your program should work on any length input (given enough memory and time).
Lowest byte count (UTF-8) wins.
Ruby: 52 - 10 = 42

Using a variation of that famous prime-matching regex.

puts ?_*gets.to_i=~/^(_|(__+?)\2+)$/?"Not!!":"Prime"


Just to be clear: ?_*gets.to_i is a string operation that appends "_" to itself n times, where n is the input number. As I see it no string lengths are compared, so that should satisfiy the 10 character bonus criterium.