For any positive integer k denote by S(k) the number of solutions (x,y)∈Z+×Z+ of the system
{⌈yx⋅d⌉⋅dx=⌈(y+1)2⌉∣x−y∣=k,
where d is the greatest common divisor of positive integers x and y. Determine S(k) as a function of k. (Here ⌈z⌉ denotes the smalles integer number which is bigger or equal than z.)