# C, 67 bytes

    i,n;main(p){for(scanf("%d",&i),n=i;--i;p=p*i*i%n);putchar(48+p%n);}

Prints <s>`!1` (a falsey value, by [Peter Taylor's definition](http://meta.codegolf.stackexchange.com/questions/2190/interpretation-of-truthy-falsey/2194#2194))</s> `0` if `(n-1)!^2 == 0 (mod n)`, and `1` otherwise.</s>

**EDIT**: After some discussion in chat, `puts("!1"+p%n)` seems to be considered a bit cheaty, so I've replaced it. The result is one byte longer.

**EDIT**: Fixed for big inputs.

## 56 bytes (unary input)

As recommended in the comments by pawel.boczarski, I could take input in unary by reading the number of command line arguments:

    p=1,n;main(i){for(n=--i;--i;p=p*i*i%n);putchar(48+p%n);}

invoking the program like

    $ ./a.out 1 1 1 1 1
    1                        <-- as 5 is prime