Create a python program for the following purpose:
Create a program that takes a positive integer N and an array A of length N, and outputs the total number of unique pairs of elements in A which sum up to an even number.
def count_even_pairs(N, A):
    n = 0
    for i in range(N):
        for j in range(i+1,N):
            if (A[i] + A[j]) % 2 == 0:
                n += 1
    return n