Sum of Two squares and Time Series Analysis