import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;

public class Main2{

    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);

    public static void main(String[] args)throws java.lang.Exception{
        new Main2().run();
        out.close();
    }

    long[] arr;

    void run()throws java.lang.Exception{
        int n = in.nextInt();
        arr = new long[n];
        boolean allSame = true;
        for(int i=0; i<n; i++){
            arr[i] = in.nextLong();
        }
        for(int i=1; i<n; i++){
            if(arr[i]!=arr[i-1]){
                allSame = false;
                break;
            }
        }
        if(allSame && n!=1){
            System.out.println(1);
            System.out.println(arr[0]);
            System.exit(0);
        }
        Arrays.sort(arr);
        if(n==1){
            System.out.println(-1);
        }else if(n==2){
            if(arr[0]==arr[1]){
                System.out.println(1);
                System.out.println(arr[0]);
                System.exit(0);
            }
            long before = arr[0]-(arr[1]-arr[0]);
            long after = arr[1]+(arr[1]-arr[0]);
            long mid = (arr[0]+arr[1])/2;
            if(mid-arr[0] != arr[1]-mid){
                System.out.println(2);
                System.out.println(before + " " + after);
            }else{
                System.out.println(3);
                System.out.println(before + " " + mid + " " + after);
            }
        }else{
            long d = arr[1]-arr[0];
            boolean ap = true;
            for(int i=2; i<arr.length; i++){
                long diff = arr[i]-arr[i-1];
                if(diff!=d){
                    ap = false;
                    break;
                }
            }
            if(ap){
                System.out.println(2);
                System.out.println((arr[0]-d) + " " + (arr[n-1]+d));
            }else{
                HashMap<Long, Integer> map = new HashMap<Long, Integer>();
                for(int i=1; i<n; i++){
                    long dif = arr[i]-arr[i-1];
                    if(map.containsKey(dif)){
                        map.put(dif, -1);
                    }else{
                        map.put(dif, i);
                    }
                }
                if(map.entrySet().size() > 2){
                    System.out.println(0);
                }else{
                    long other = -1;
                    int i = -1;
                    for(Long dif : map.keySet()){
                        if(map.get(dif)==-1){
                            other = dif;
                            continue;
                        }
                        i = map.get(dif);
                    }
                    long mid = (arr[i]+arr[i-1])/2;
                    if(mid-arr[i-1]==arr[i]-mid && arr[i]-mid==other){
                        System.out.println(1);
                        System.out.println(mid);
                    }else{
                        System.out.println(0);
                    }
                }
            }
        }
    }
}

class FastReader{
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream){
        this.stream = stream;
    }

    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }

    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }

    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString ());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }

    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }

    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }

    public String next(){
        return nextString ();
    }

    public SpaceCharFilter getFilter(){
        return filter;
    }

    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }

    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;

public class Main2{

    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);

    public static void main(String[] args)throws java.lang.Exception{
        new Main2().run();
        out.close();
    }

    void run()throws java.lang.Exception{
        int n = in.nextInt();
        long[] a = new long[n];
        boolean allSame = true;
        for(int i=0; i<n; i++){
            a[i] = in.nextLong();
            if(i!=0 && a[i]!=a[i-1]){
                allSame = false;
            }
        }
        if(n==1){
            System.out.println(-1);
            System.exit(0);
        }
        Arrays.sort(a);
        if(allSame){
            System.out.println(1);
            System.out.println(a[0]);
            System.exit(0);
        }
        if(n==2){
            if((a[0]+a[1]) %2==0){
                System.out.println(3);
                long d = a[1]-a[0];
                System.out.println((a[0]-d) +
                        " " + (a[0]+a[1])/2 + " "
                        + (a[1]+d));
            }else{
                System.out.println(2);
                long d = a[1]-a[0];
                System.out.println((a[0]-d) + " " + (a[1]+d));
            }
        }else{
            long d = a[1]-a[0];
            boolean ap = true;
            for(int i=1; i<n; i++){
                if(a[i]-a[i-1] != d){
                    ap = false;
                    break;
                }
            }
            if(ap){
                System.out.println(2);
                System.out.println((a[0]-d) + " " + (a[n-1]+d));
            }else{
                HashMap<Long, Integer> map = new HashMap<Long, Integer>();
                for(int i=1; i<n; i++){
                    long dif = a[i]-a[i-1];
                    if(map.containsKey(dif)){
                        map.put(dif, map.get(dif)+1);
                    }else{
                        map.put(dif, 1);
                    }
                }
                if(map.size()>=3){
                    System.out.println(0);
                    System.exit(0);
                }else{
                    long x1 = Integer.MAX_VALUE;
                    long x2 = -1;
                    for(Long xx : map.keySet()){
                        if(x1!=Integer.MAX_VALUE){
                            x2 = xx;
                        }else{
                            x1 = xx;
                        }
                    }
//                  System.out.println(x1 + " " + x2 + " are diffs");
                    long hi = Math.max(x1, x2);
                    long lo = Math.min(x1, x2);
                    if(map.get(hi)!=1){
                        System.out.println(0);
                    }else if(hi==lo*2){
                        System.out.println(1);
                        for(int i=1; i<n; i++){
                            long dif = a[i]-a[i-1];
                            if(dif==hi){
                                System.out.println((a[i-1]+dif/2));
                            }
                        }
                    }else{
                        System.out.println(0);
                    }
                }
            }
        }
    }
}

class FastReader{
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream){
        this.stream = stream;
    }

    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }

    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }

    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString ());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }

    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }

    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }

    public String next(){
        return nextString ();
    }

    public SpaceCharFilter getFilter(){
        return filter;
    }

    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }

    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;

public class Main2{

    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);

    public static void main(String[] args)throws java.lang.Exception{
        new Main2().run();
        out.close();
    }

    long[] arr;

    void run()throws java.lang.Exception{
        int n = in.nextInt();
        arr = new long[n];
        for(int i=0; i<n; i++){
            arr[i] = in.nextLong();
        }
        Arrays.sort(arr);
        if(n==1){
            System.out.println(-1);
        }else if(n==2){
            if(arr[0]==arr[1]){
                System.out.println(1);
                System.out.println(arr[0]);
                System.exit(0);
            }
            long before = arr[0]-(arr[1]-arr[0]);
            long after = arr[1]+(arr[1]-arr[0]);
            long mid = (arr[0]+arr[1])/2;
            if(mid-arr[0] != arr[1]-mid){
                System.out.println(2);
                System.out.println(before + " " + after);
            }else{
                System.out.println(3);
                System.out.println(before + " " + mid + " " + after);
            }
        }else{
            long d = arr[1]-arr[0];
            boolean ap = true;
            for(int i=2; i<arr.length; i++){
                long diff = arr[i]-arr[i-1];
                if(diff!=d){
                    ap = false;
                    break;
                }
            }
            if(ap){
                System.out.println(2);
                System.out.println((arr[0]-d) + " " + (arr[n-1]+d));
            }else{
                HashMap<Long, Integer> map = new HashMap<Long, Integer>();
                for(int i=1; i<n; i++){
                    long dif = arr[i]-arr[i-1];
                    if(map.containsKey(dif)){
                        map.put(dif, -1);
                    }else{
                        map.put(dif, i);
                    }
                }
                if(map.entrySet().size() > 2){
                    System.out.println(0);
                }else{
                    long other = -1;
                    int i = -1;
                    for(Long dif : map.keySet()){
                        if(map.get(dif)==-1){
                            other = dif;
                            continue;
                        }
                        i = map.get(dif);
                    }
                    long mid = (arr[i]+arr[i-1])/2;
                    if(mid-arr[i-1]==arr[i]-mid && arr[i]-mid==other){
                        System.out.println(1);
                        System.out.println(mid);
                    }else{
                        System.out.println(0);
                    }
                }
            }
        }
    }
}

class FastReader{
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream){
        this.stream = stream;
    }

    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }

    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }

    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString ());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }

    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }

    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }

    public String next(){
        return nextString ();
    }

    public SpaceCharFilter getFilter(){
        return filter;
    }

    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }

    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;

public class Main2{

    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);

    public static void main(String[] args)throws java.lang.Exception{
        new Main2().run();
        out.close();
    }

    long[] arr;

    void run()throws java.lang.Exception{
        int n = in.nextInt();
        arr = new long[n];
        boolean allSame = true;
        for(int i=0; i<n; i++){
            arr[i] = in.nextLong();
        }
        for(int i=1; i<n; i++){
            if(arr[i]!=arr[i-1]){
                allSame = false;
                break;
            }
        }
        if(allSame){
            System.out.println(1);
            System.out.println(arr[0]);
            System.exit(0);
        }
        Arrays.sort(arr);
        if(n==1){
            System.out.println(-1);
        }else if(n==2){
            if(arr[0]==arr[1]){
                System.out.println(1);
                System.out.println(arr[0]);
                System.exit(0);
            }
            long before = arr[0]-(arr[1]-arr[0]);
            long after = arr[1]+(arr[1]-arr[0]);
            long mid = (arr[0]+arr[1])/2;
            if(mid-arr[0] != arr[1]-mid){
                System.out.println(2);
                System.out.println(before + " " + after);
            }else{
                System.out.println(3);
                System.out.println(before + " " + mid + " " + after);
            }
        }else{
            long d = arr[1]-arr[0];
            boolean ap = true;
            for(int i=2; i<arr.length; i++){
                long diff = arr[i]-arr[i-1];
                if(diff!=d){
                    ap = false;
                    break;
                }
            }
            if(ap){
                System.out.println(2);
                System.out.println((arr[0]-d) + " " + (arr[n-1]+d));
            }else{
                HashMap<Long, Integer> map = new HashMap<Long, Integer>();
                for(int i=1; i<n; i++){
                    long dif = arr[i]-arr[i-1];
                    if(map.containsKey(dif)){
                        map.put(dif, -1);
                    }else{
                        map.put(dif, i);
                    }
                }
                if(map.entrySet().size() > 2){
                    System.out.println(0);
                }else{
                    long other = -1;
                    int i = -1;
                    for(Long dif : map.keySet()){
                        if(map.get(dif)==-1){
                            other = dif;
                            continue;
                        }
                        i = map.get(dif);
                    }
                    long mid = (arr[i]+arr[i-1])/2;
                    if(mid-arr[i-1]==arr[i]-mid && arr[i]-mid==other){
                        System.out.println(1);
                        System.out.println(mid);
                    }else{
                        System.out.println(0);
                    }
                }
            }
        }
    }
}

class FastReader{
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream){
        this.stream = stream;
    }

    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }

    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }

    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString ());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }

    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }

    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }

    public String next(){
        return nextString ();
    }

    public SpaceCharFilter getFilter(){
        return filter;
    }

    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }

    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;

public class Main2{

    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);

    public static void main(String[] args)throws java.lang.Exception{
        new Main2().run();
        out.close();
    }

    void run()throws java.lang.Exception{
        int n = in.nextInt();
        long[] a = new long[n];
        boolean allSame = true;
        for(int i=0; i<n; i++){
            a[i] = in.nextLong();
            if(i!=0 && a[i]!=a[i-1]){
                allSame = false;
            }
        }
        if(n==1){
            System.out.println(-1);
            System.exit(0);
        }
        Arrays.sort(a);
        if(allSame){
            System.out.println(1);
            System.out.println(a[0]);
            System.exit(0);
        }
        if(n==2){
            if((a[0]+a[1]) %2==0){
                System.out.println(3);
                long d = a[1]-a[0];
                System.out.println((a[0]-d) +
                        " " + (a[0]+a[1])/2 + " "
                        + (a[1]+d));
            }else{
                System.out.println(2);
                long d = a[1]-a[0];
                System.out.println((a[0]-d) + " " + (a[1]+d));
            }
        }else{
            long d = a[1]-a[0];
            boolean ap = true;
            for(int i=1; i<n; i++){
                if(a[i]-a[i-1] != d){
                    ap = false;
                    break;
                }
            }
            if(ap){
                System.out.println(2);
                System.out.println((a[0]-d) + " " + (a[n-1]+d));
            }else{
                HashMap<Long, Integer> map = new HashMap<Long, Integer>();
                for(int i=1; i<n; i++){
                    long dif = a[i]-a[i-1];
                    if(map.containsKey(dif)){
                        map.put(dif, map.get(dif)+1);
                    }else{
                        map.put(dif, 1);
                    }
                }
                if(map.size()>=3){
                    System.out.println(0);
                    System.exit(0);
                }else{
                    long x1 = Integer.MAX_VALUE;
                    long x2 = -1;
                    for(Long xx : map.keySet()){
                        if(x1!=Integer.MAX_VALUE){
                            x2 = xx;
                        }else{
                            x1 = xx;
                        }
                    }
//                  System.out.println(x1 + " " + x2 + " are diffs");
                    long hi = Math.max(x1, x2);
                    long lo = Math.min(x1, x2);
                    if(map.get(hi)!=1){
                        System.out.println(0);
                    }else if(hi==lo*2){
                        System.out.println(1);
                        for(int i=1; i<n; i++){
                            long dif = a[i]-a[i-1];
                            if(dif==hi){
                                System.out.println((a[i-1]+dif/2));
                            }
                        }
                    }
                }
            }
        }
    }
}

class FastReader{
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream){
        this.stream = stream;
    }

    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }

    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }

    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString ());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }

    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }

    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }

    public String next(){
        return nextString ();
    }

    public SpaceCharFilter getFilter(){
        return filter;
    }

    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }

    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class C {

	static class Scanner{
		BufferedReader br=null;
		StringTokenizer tk=null;
		public Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() throws IOException{
			while(tk==null || !tk.hasMoreTokens())
				tk=new StringTokenizer(br.readLine());
			return tk.nextToken();
		}
		public int nextInt() throws NumberFormatException, IOException{
			return Integer.valueOf(next());
		}
		public long nextLong() throws NumberFormatException, IOException{
			return Long.valueOf(next());
		}
		public double nextDouble() throws NumberFormatException, IOException{
			return Double.valueOf(next());
		}
	}

	public static void main(String args[]) throws NumberFormatException, IOException{
		Scanner sc = new Scanner();
		int N = sc.nextInt();
		Integer[] array = new Integer[N];
		for(int i = 0; i < N; i++)
			array[i] = sc.nextInt();
		Arrays.sort(array);
		int[] a = new int[N];
		for(int i = 0; i < N; i++)
			a[i] = array[i];
		if (N == 1){
			System.out.println("-1");
			return;
		}
		if (N == 2){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = a[1] - a[0];
			ans.add(a[0] - diff);
			if (diff % 2 == 0)
				ans.add(a[0] + (diff/2));
			ans.add(a[1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		for(int i = 0; i < N - 1; i++){
			int diff = a[i + 1] - a[i];
			if(map.containsKey(diff))
				map.put(diff, map.get(diff) + 1);
			else
				map.put(diff, 1);
		}
		if (map.size() > 2){
			System.out.println("0");
			return;
		}
		if (map.size() == 1){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = 0;
			for(int d: map.keySet())
				diff = d;
			ans.add(a[0] - diff);
			ans.add(a[a.length - 1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}

		boolean flag = false;
		int diff = 0;
		int otradiff = 0;
		for(int k: map.keySet()){
			if (map.get(k) == 1){
				flag = true;
				diff = k;
			}
		}
		if (!flag){
			System.out.println("0");
			return;
		}
		for(int k: map.keySet()){
			if (map.get(k) != 1){
				otradiff = k;
			}
		}
		if (diff % 2 != 0){
			System.out.println("0");
			return;
		}
		diff /= 2;
		if (otradiff != diff){
			System.out.println("0");
			return;
		}
		int donde = 0;
		for(int i = 0; i < N - 1; i++)
			if ((a[i + 1] - a[i]) == (diff * 2)){
				donde = i;
				break;
			}
		System.out.println("1");
		System.out.println(a[donde] + diff);
		return;
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class C {

	static class Scanner{
		BufferedReader br=null;
		StringTokenizer tk=null;
		public Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() throws IOException{
			while(tk==null || !tk.hasMoreTokens())
				tk=new StringTokenizer(br.readLine());
			return tk.nextToken();
		}
		public int nextInt() throws NumberFormatException, IOException{
			return Integer.valueOf(next());
		}
		public long nextLong() throws NumberFormatException, IOException{
			return Long.valueOf(next());
		}
		public double nextDouble() throws NumberFormatException, IOException{
			return Double.valueOf(next());
		}
	}

	public static void main(String args[]) throws NumberFormatException, IOException{
		Scanner sc = new Scanner();
		int N = sc.nextInt();
		Integer[] array = new Integer[N];
		for(int i = 0; i < N; i++)
			array[i] = sc.nextInt();
		Arrays.sort(array);
		int[] a = new int[N];
		for(int i = 0; i < N; i++)
			a[i] = array[i];
		if (N == 1){
			System.out.println("-1");
			return;
		}
		if (N == 2){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = a[1] - a[0];
			ans.add(a[0] - diff);
			if (diff % 2 == 0)
				ans.add(a[0] + (diff/2));
			ans.add(a[1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
		for(int i = 0; i < N - 1; i++){
			int diff = a[i + 1] - a[i];
			if(map.containsKey(diff))
				map.put(diff, map.get(diff) + 1);
			else
				map.put(diff, 1);
		}
		if (map.size() > 2){
			System.out.println("0");
			return;
		}
		if (map.size() == 1){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = 0;
			for(int d: map.keySet())
				diff = d;
			ans.add(a[0] - diff);
			ans.add(a[a.length - 1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		int t1 = map.get(map.firstKey());
		int t2 = map.get(map.lastKey());
		if (t1 != 1 && t2 != 1){
			System.out.println("0");
			return;
		}
		int diff = map.lastKey();
		int otra = map.firstKey();
		if (diff % 2 != 0){
			System.out.println("0");
			return;
		}
		diff /= 2;
		if (diff != otra){
			System.out.println("0");
			return;
		}
		int donde = 0;
		for(int i = 0; i < N - 1; i++)
			if ((a[i + 1] - a[i]) == (diff * 2)){
				donde = i;
				break;
			}
		System.out.println("1");
		System.out.println(a[donde] + diff);
		return;
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class C {

	static class Scanner{
		BufferedReader br=null;
		StringTokenizer tk=null;
		public Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() throws IOException{
			while(tk==null || !tk.hasMoreTokens())
				tk=new StringTokenizer(br.readLine());
			return tk.nextToken();
		}
		public int nextInt() throws NumberFormatException, IOException{
			return Integer.valueOf(next());
		}
		public long nextLong() throws NumberFormatException, IOException{
			return Long.valueOf(next());
		}
		public double nextDouble() throws NumberFormatException, IOException{
			return Double.valueOf(next());
		}
	}

	public static void main(String args[]) throws NumberFormatException, IOException{
		Scanner sc = new Scanner();
		int N = sc.nextInt();
		Integer[] array = new Integer[N];
		for(int i = 0; i < N; i++)
			array[i] = sc.nextInt();
		Arrays.sort(array);
		int[] a = new int[N];
		for(int i = 0; i < N; i++)
			a[i] = array[i];
		if (N == 1){
			System.out.println("-1");
			return;
		}
		if (N == 2){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = a[1] - a[0];
			ans.add(a[0] - diff);
			if (diff % 2 == 0)
				ans.add(a[0] + (diff/2));
			ans.add(a[1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
		for(int i = 0; i < N - 1; i++){
			int diff = a[i + 1] - a[i];
			if(map.containsKey(diff))
				map.put(diff, map.get(diff) + 1);
			else
				map.put(diff, 1);
		}
		if (map.size() > 2){
			System.out.println("0");
			return;
		}
		if (map.size() == 1){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = 0;
			for(int d: map.keySet())
				diff = d;
			ans.add(a[0] - diff);
			ans.add(a[a.length - 1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		int t1 = map.get(map.firstKey());
		int t2 = map.get(map.lastKey());
		if (t1 != 1 && t2 != 1){
			System.out.println("0");
			return;
		}
		int diff = map.lastKey();
		int otra = map.firstKey();
		if ((map.get(diff) > 1) ||  diff % 2 != 0){
			System.out.println("0");
			return;
		}
		diff /= 2;
		if (diff != otra){
			System.out.println("0");
			return;
		}
		int donde = 0;
		for(int i = 0; i < N - 1; i++)
			if ((a[i + 1] - a[i]) == (diff * 2)){
				donde = i;
				break;
			}
		System.out.println("1");
		System.out.println(a[donde] + diff);
		return;
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class C {

	static class Scanner{
		BufferedReader br=null;
		StringTokenizer tk=null;
		public Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() throws IOException{
			while(tk==null || !tk.hasMoreTokens())
				tk=new StringTokenizer(br.readLine());
			return tk.nextToken();
		}
		public int nextInt() throws NumberFormatException, IOException{
			return Integer.valueOf(next());
		}
		public long nextLong() throws NumberFormatException, IOException{
			return Long.valueOf(next());
		}
		public double nextDouble() throws NumberFormatException, IOException{
			return Double.valueOf(next());
		}
	}

	public static void main(String args[]) throws NumberFormatException, IOException{
		Scanner sc = new Scanner();
		int N = sc.nextInt();
		Integer[] array = new Integer[N];
		for(int i = 0; i < N; i++)
			array[i] = sc.nextInt();
		Arrays.sort(array);
		int[] a = new int[N];
		for(int i = 0; i < N; i++)
			a[i] = array[i];
		if (N == 1){
			System.out.println("-1");
			return;
		}
		if (N == 2){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			int diff = a[1] - a[0];
			ans.add(a[0] - diff);
			if (diff % 2 == 0)
				ans.add(a[0] + (diff/2));
			ans.add(a[1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		int number = 1;
		int diff = a[1] - a[0];
		int ndiff = 0;
		int donde = 0;
		for(int i = 1; i < N - 1; i++)
			if ((a[i + 1] - a[i]) != diff){
				number++;
				ndiff = a[i + 1] - a[i];
				donde = i;
			}
		if (number == 1){
			TreeSet<Integer> ans = new TreeSet<Integer>();
			ans.add(a[0] - diff);
			ans.add(a[a.length - 1] + diff);
			System.out.println(ans.size());
			for(int e: ans)
				System.out.print(e+" ");
			System.out.println();
			return;
		}
		if (number == 2){
			if (ndiff % 2 != 0){
				System.out.println("0");
				return;
			}
			ndiff /= 2;
			if (ndiff != diff){
				System.out.println("0");
				return;
			}
			System.out.println("1");
			System.out.println(a[donde] + diff);
			return;
		}
		System.out.println("0");
	}

}


import java.io.*;
import java.util.*;
public class hashcoder
{
    public static void main(String args[]) throws IOException
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long arr[] = new long[n];
        for(int i=0;i<n;i++)
        {
            arr[i] = scan.nextLong();
        }
        Arrays.sort(arr);
        if(n==1)
        {
            System.out.println("-1");
        }
        else if(n==2)
        {
            long diff = arr[1]-arr[0];
            if(diff%2==0)
            {
                if(diff == 0)
                {
                    System.out.println(1);
                    System.out.println(arr[0]);
                }
                else
                {
                    System.out.println("3");
                    System.out.println((arr[0]-diff)+" "+(arr[0]+diff/2)+" "+(arr[1]+diff));
                }
            }
            else
            {
                System.out.println("2");
                System.out.println((arr[0]-diff)+" "+(arr[1]+diff));
            }
        }
        else if(n>2)
        {
            int count = 0;
            int index = -1;
            long diff1 = arr[1] - arr[0];
            long diff2 = arr[2] - arr[1];
            long diffm1 = diff1,diffm2 = diff2;
            boolean flag = true;
            if(diff1!=diff2)
            {
                count+=1;
                if(diff1>diff2)
                {
                    index = 0;
                }
                else
                {
                    index = 1;
                }
                diffm1 = Math.min(diff1, diff2);
                diffm2 = Math.max(diff1, diff2);
                if(diffm2%2!=0)
                {
                    flag = false;
                }
                else if(diffm2/2 != diffm1)
                {
                    flag = false;
                }
            }
            for(int i=2;i<n-1;i++)
            {
                long diff = arr[i+1]-arr[i];
                if(diffm1!=diff && count!=0)
                {
                    flag = false;
                    break;
                }
                else if(diffm1!=diff && count == 0)
                {
                    index = i;
                    if(diff%2!=0)
                    {
                        flag = false;
                        break;
                    }
                    else if(diff%2==0)
                    {
                        if(diff/2 != diffm1)
                        {
                            flag = false;
                            break;
                        }
                    }
                    count++;
                }
            }
            if(flag == false)
                System.out.println(0);

            else if(count == 0 && flag == true)
            {
                if(diff1 == 0)
                {
                    System.out.println(1);
                    System.out.println(arr[0]);
                }
                else
                {
                    System.out.println(2);
                    System.out.println((arr[0]-diffm1)+" "+(arr[n-1]+diffm1));
                }
            }
            else if(count ==1 && flag == true)
            {
                if((arr[index+1]-arr[index])%2==0)
                {
                    System.out.println(1);
                    System.out.println((arr[index]+(arr[index+1]-arr[index])/2));
                }
                else
                {
                    System.out.println(0);
                }
            }
            else
            {
                System.out.println(0);
            }

        }
    }
}


import java.io.*;
import java.util.*;
public class hashcoder
{
    public static void main(String args[]) throws IOException
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long arr[] = new long[n];
        for(int i=0;i<n;i++)
        {
            arr[i] = scan.nextLong();
        }
        Arrays.sort(arr);
        if(n==1)
        {
            System.out.println("-1");
        }
        else if(n==2)
        {
            long diff = arr[1]-arr[0];
            if(diff%2==0)
            {
                System.out.println("3");
                System.out.println((arr[0]-diff)+" "+(arr[0]+diff/2)+" "+(arr[1]+diff));
            }
            else
            {
                System.out.println("2");
                System.out.println((arr[0]-diff)+" "+(arr[1]+diff));
            }
        }
        else if(n>2)
        {
            int count = 0;
            boolean endflag = false;
            int index = -1;
            long diff1 = arr[1] - arr[0];
            long diff2 = arr[2] - arr[1];
            boolean flag = true;
            if(diff1!=diff2)
            {
                count+=1;
                if(diff1>diff2)
                {
                    index = 0;
                }
                else
                {
                    index = 1;
                }
                diff1 = Math.min(diff1, diff2);
            }
            for(int i=2;i<n-1;i++)
            {
                long diff = arr[i+1]-arr[i];
                if(diff1!=diff && count!=0)
                {
                    flag = false;
                    break;
                }
                else if(diff1!=diff && count == 0)
                {
                    index = i;
                    count++;
                }
            }
            if(count == 0 && flag == true)
            {
                System.out.println(2);
                System.out.println((arr[0]-diff1)+" "+(arr[n-1]+diff1));
            }
            else if(count !=0 && flag == true)
            {
                if((arr[index+1]-arr[index])%2==0)
                {
                    System.out.println(1);
                    System.out.println((arr[index]+(arr[index+1]-arr[index])/2));
                }
                else
                {
                    System.out.println(0);
                }
            }
            else
            {
                System.out.println(0);
            }

        }
    }
}


import java.io.*;
import java.util.*;
public class hashcoder
{
    public static void main(String args[]) throws IOException
    {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long arr[] = new long[n];
        for(int i=0;i<n;i++)
        {
            arr[i] = scan.nextLong();
        }
        Arrays.sort(arr);
        if(n==1)
        {
            System.out.println("-1");
        }
        else if(n==2)
        {
            long diff = arr[1]-arr[0];
            if(diff%2==0)
            {
                if(diff == 0)
                {
                    System.out.println(1);
                    System.out.println(arr[0]);
                }
                else
                {
                    System.out.println("3");
                    System.out.println((arr[0]-diff)+" "+(arr[0]+diff/2)+" "+(arr[1]+diff));
                }
            }
            else
            {
                System.out.println("2");
                System.out.println((arr[0]-diff)+" "+(arr[1]+diff));
            }
        }
        else if(n>2)
        {
            int count = 0;
            int index = -1;
            long diff1 = arr[1] - arr[0];
            long diff2 = arr[2] - arr[1];
            boolean flag = true;
            if(diff1!=diff2)
            {
                count+=1;
                if(diff1>diff2)
                {
                    index = 0;
                }
                else
                {
                    index = 1;
                }
                long diffm1 = Math.min(diff1, diff2);
                long diffm2 = Math.max(diff1, diff2);
                if(diffm2%2!=0)
                {
                    flag = false;
                }
                else if(diffm2/2 != diffm1)
                {
                    flag = false;
                }
            }
            for(int i=2;i<n-1;i++)
            {
                long diff = arr[i+1]-arr[i];
                if(diff1!=diff && count!=0)
                {
                    flag = false;
                    break;
                }
                else if(diff1!=diff && count == 0)
                {
                    index = i;
                    if(diff%2!=0)
                    {
                        flag = false;
                        break;
                    }
                    else if(diff%2==0)
                    {
                        if(diff/2 != diff1)
                        {
                            flag = false;
                            break;
                        }
                    }
                    count++;
                }
            }
            if(flag == false)
                System.out.println(0);

            else if(count == 0 && flag == true)
            {
                if(diff1 == 0)
                {
                    System.out.println(1);
                    System.out.println(arr[0]);
                }
                else
                {
                    System.out.println(2);
                    System.out.println((arr[0]-diff1)+" "+(arr[n-1]+diff1));
                }
            }
            else if(count ==1 && flag == true)
            {
                if((arr[index+1]-arr[index])%2==0)
                {
                    System.out.println(1);
                    System.out.println((arr[index]+(arr[index+1]-arr[index])/2));
                }
                else
                {
                    System.out.println(0);
                }
            }
            else
            {
                System.out.println(0);
            }

        }
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import static java.lang.System.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class P382c{
	static PrintStream ps;
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(in));
		ps = new PrintStream(new BufferedOutputStream(out));
		StringTokenizer st;

		while(true){
			String s = br.readLine();
			if(s==null)	break;
			int n = Integer.valueOf(s);
			int[] arr = new int[n];
			st = new StringTokenizer(br.readLine());
			for(int i=0; i<n; i++)
				arr[i] = Integer.valueOf(st.nextToken());
			Arrays.sort(arr);
			TreeSet<Integer> solution = new TreeSet<Integer>();
			boolean impossible = false;
			if(n==1){
				// ps.println(-1);
				impossible = true;
			}else if(n==2){
				int d = arr[1]-arr[0];
				if(d%2==1){
					// ps.println(2);
					// ps.printf("%d %d\n", arr[0]-d, arr[1]+d);
					solution.add(arr[0]-d);
					solution.add(arr[1]+d);
				}else{
					// ps.println(3);
					// ps.printf("%d %d %d\n", arr[0]-d, arr[0]+d/2, arr[1]+d);
					solution.add(arr[0]-d);
					solution.add(arr[0]+d/2);
					solution.add(arr[1]+d);
				}
			}else{
				HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
				for(int i=0; i<n-1; i++){
					int diff = arr[i+1]-arr[i];
					if(!map.containsKey(diff))
						map.put(diff, 0);
					map.put(diff, map.get(diff)+1);
				}
				if(map.size()>2){
					// ps.println(0);
					// continue;
				}else if(map.size()==2){
					ArrayList<Integer> tmp = new ArrayList<Integer>();
					for(int key : map.keySet())
						tmp.add(key);
					int small = min(tmp.get(0), tmp.get(1));
					int large = max(tmp.get(0), tmp.get(1));
					if(map.get(large)!=1 || small*2!=large){
						// ps.println(0);
					}else{
						int idx = 0;
						while((arr[idx+1]-arr[idx])!=large)
							idx++;
						// ps.println(1);
						// ps.println(arr[idx]+small);
						solution.add(arr[idx]+small);
					}
				}else if(map.size()==1){
					// ps.println(2);
					int d = arr[1]-arr[0];
					// ps.printf("%d %d\n", arr[0]-d, arr[n-1]+d);
					solution.add(arr[0]-d);
					solution.add(arr[n-1]+d);
				}
			}
			if(impossible){
				ps.println(-1);
			}else{
				boolean first = true;
				ps.println(solution.size());
				for(int key : solution){
					if(first){
						first = false;
					}else{
						ps.print(" ");
					}
					ps.print(key);
				}
				if(solution.size()>0)
					ps.println();
			}
		}

		ps.flush();
	}
}


import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import static java.lang.System.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class P382c{
	static PrintStream ps;
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(in));
		ps = new PrintStream(new BufferedOutputStream(out));
		StringTokenizer st;

		while(true){
			String s = br.readLine();
			if(s==null)	break;
			int n = Integer.valueOf(s);
			int[] arr = new int[n];
			st = new StringTokenizer(br.readLine());
			for(int i=0; i<n; i++)
				arr[i] = Integer.valueOf(st.nextToken());
			Arrays.sort(arr);
			if(n==1){
				ps.println(-1);
			}else if(n==2){
				int d = arr[1]-arr[0];
				if(d%2==1){
					ps.println(2);
					ps.printf("%d %d\n", arr[0]-d, arr[1]+d);
				}else{
					ps.println(3);
					ps.printf("%d %d %d\n", arr[0]-d, arr[0]+d/2, arr[1]+d);
				}
			}else{
				HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
				for(int i=0; i<n-1; i++){
					int diff = arr[i+1]-arr[i];
					if(!map.containsKey(diff))
						map.put(diff, 0);
					map.put(diff, map.get(diff)+1);
				}
				if(map.size()>2){
					ps.println(0);
					continue;
				}else if(map.size()==2){
					ArrayList<Integer> tmp = new ArrayList<Integer>();
					for(int key : map.keySet())
						tmp.add(key);
					int small = min(tmp.get(0), tmp.get(1));
					int large = max(tmp.get(0), tmp.get(1));
					if(map.get(large)!=1 || small*2!=large){
						ps.println(0);
					}else{
						int idx = 0;
						while((arr[idx+1]-arr[idx])!=large)
							idx++;
						ps.println(1);
						ps.println(arr[idx]+small);
					}
				}else if(map.size()==1){
					ps.println(2);
					int d = arr[1]-arr[0];
					ps.printf("%d %d\n", arr[0]-d, arr[n-1]+d);
				}
			}
		}

		ps.flush();
	}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class AP2 {
public static void main(String[] args) throws Exception {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

	int n = Integer.parseInt(br.readLine());

	int[] values = new int[n];

	StringTokenizer st =new StringTokenizer(br.readLine());

	for(int i=0;i<n;++i)
	{
		values[i] = Integer.parseInt(st.nextToken());
	}
	Arrays.sort(values);
	if(n==1)
	{
		pw.println("-1");
	}
	else
		if(n==2)
		{
			int d = values[1]-values[0];
			if(d==0)
			{
				pw.println("1\n"+values[1]);

			}
			else
			if(d%2==0)
			{
				int d2 = d/2;
				pw.println("3\n"+(values[0]-d)+" "+(values[0]+d2)+" "+(values[1]+d));
			}
			else
			{
				pw.println("2\n"+(values[0]-d)+" "+(values[1]+d));
			}
		}
		else
		{
				int d1 = values[1]-values[0];
				int d2 = values[2]-values[1];
				boolean switched = false;
				if(d2<d1)
				{
					d1=d2;
					d2=values[1]-values[0];
					switched = true;
				}

				if(d2!=d1)
				{
					if(d2==0 || d1==0)
					{
						pw.println("0");
					}
					else
					if(d2%d1==0 && d2/d1==2)
					{
						int diff = d1;
						boolean isAP = true;
						for(int i=3;i<n;++i)
						{
							if((values[i]-values[i-1])!=diff)
							{
								isAP = false;
								break;
							}
						}
						if(isAP)
						{
							pw.println("1");
							if(switched)
							{
								pw.println((values[0]+(d2/d1)));
							}
							else
							{
								pw.println((values[1]+(d2/d1)));
							}
						}
						else
						{
							pw.println("0");
						}
					}
					else
					{
						pw.println("0");
					}

				}
				else
				{
					boolean isAP = true;
					boolean mightbeAP = true;
					int pos = -1;
					for(int i=1;i<n;++i)
					{
						if((values[i]-values[i-1])!=d1)
						{
							if(isAP)
							{
								isAP = false;
								pos = i;
							}
							else
							{
								mightbeAP = false;
								break;
							}
						}
					}

					if(!mightbeAP)
					{
						pw.println("0");
					}
					else
						if(!isAP)
						{
							int newdiff = values[pos]-values[pos-1];
							if(d1==0)
							{
								pw.println("0");
							}
							else
							if(newdiff%d1==0 && newdiff/d1==2)
							{
								pw.println("1\n"+(values[pos-1]+d1));
							}
							else
							{
								pw.println("0");
							}
						}
						else
						{
							if(d1==0)
							{
								pw.println("1\n"+values[0]);
							}
							else
							{
								pw.println("2\n"+(values[0]-d1)+" "+(values[n-1]+d1));
							}
						}

				}

		}

	pw.flush();
	pw.close();
}
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class AP2 {
public static void main(String[] args) throws Exception {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

	int n = Integer.parseInt(br.readLine());

	int[] values = new int[n];

	StringTokenizer st =new StringTokenizer(br.readLine());

	for(int i=0;i<n;++i)
	{
		values[i] = Integer.parseInt(st.nextToken());
	}
	Arrays.sort(values);
	if(n==1)
	{
		pw.println("-1");
	}
	else
		if(n==2)
		{
			int d = values[1]-values[0];
			if(d==0)
			{
				pw.println("1\n"+values[1]);

			}
			else
			if(d%2==0)
			{
				int d2 = d/2;
				pw.println("3\n"+(values[0]-d)+" "+(values[0]+d2)+" "+(values[1]+d));
			}
			else
			{
				pw.println("2\n"+(values[0]-d)+" "+(values[1]+d));
			}
		}
		else
		{
				int d1 = values[1]-values[0];
				int d2 = values[2]-values[1];
				boolean switched = false;
				if(d2<d1)
				{
					d1=d2;
					d2=values[1]-values[0];
					switched = true;
				}

				if(d2!=d1)
				{
					if(d2==0 || d1==0)
					{
						pw.println("0");
					}
					else
					if(d2%d1==0 && d2/d1==2)
					{
						int diff = d1;
						boolean isAP = true;
						for(int i=3;i<n;++i)
						{
							if((values[i]-values[i-1])!=diff)
							{
								isAP = false;
								break;
							}
						}
						if(isAP)
						{
							pw.println("1");
							if(switched)
							{
								pw.println((values[0]+d1));
							}
							else
							{
								pw.println((values[1]+d1));
							}
						}
						else
						{
							pw.println("0");
						}
					}
					else
					{
						pw.println("0");
					}

				}
				else
				{
					boolean isAP = true;
					boolean mightbeAP = true;
					int pos = -1;
					for(int i=1;i<n;++i)
					{
						if((values[i]-values[i-1])!=d1)
						{
							if(isAP)
							{
								isAP = false;
								pos = i;
							}
							else
							{
								mightbeAP = false;
								break;
							}
						}
					}

					if(!mightbeAP)
					{
						pw.println("0");
					}
					else
						if(!isAP)
						{
							int newdiff = values[pos]-values[pos-1];
							if(d1==0)
							{
								pw.println("0");
							}
							else
							if(newdiff%d1==0 && newdiff/d1==2)
							{
								pw.println("1\n"+(values[pos-1]+d1));
							}
							else
							{
								pw.println("0");
							}
						}
						else
						{
							if(d1==0)
							{
								pw.println("1\n"+values[0]);
							}
							else
							{
								pw.println("2\n"+(values[0]-d1)+" "+(values[n-1]+d1));
							}
						}

				}

		}

	pw.flush();
	pw.close();
}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int [] a =new int[n];
		StringTokenizer st = new StringTokenizer(br.readLine());
		for (int i = 0; i < n; i++)
		{
			a[i] = Integer.parseInt(st.nextToken());
		}

		Arrays.sort(a);

		if(n==1){
			System.out.println(-1);
		}else if(n==2){
			int a0 = a[0];
			int a1 = a[1];
			if((a0-a1)%2==0 && a1!=a0){
				System.out.println(3);
				System.out.print((a0-(a1-a0))+" "+((a0+a1)/2)+" "+(a1+(a1-a0)));
			}else if(a1==a0){
				System.out.println(1);
				System.out.print(a0);
			}else {
				System.out.println(2);
				System.out.print((a0-(a1-a0))+" "+(a1+(a1-a0)));
			}
		}else{
			int minDis = Integer.MAX_VALUE;
			for(int i=0;i<n-1;i++){
				if((a[i+1]-a[i]) < minDis) minDis = (a[i+1]-a[i]);

			}

			boolean IsPossible = true;
			int cntNotMin = 0;
			int LastNumNotMin = -1;
			for(int i=0;i<n-1;i++){
				if((a[i+1]-a[i]) > minDis){
					cntNotMin++;
					if((a[i+1]-a[i])!=2*minDis) IsPossible = false;
					else LastNumNotMin = i;
				}
			}

			if(cntNotMin>1)IsPossible = false;

			if(!IsPossible) System.out.println(0);
			else if(cntNotMin==1){
				System.out.println(1);
				System.out.print((a[LastNumNotMin]+minDis));
			}else if(cntNotMin==0 && minDis!=0){
				System.out.println(2);
				System.out.print((a[0]-minDis)+" "+(a[n-1]+minDis));
			}else if(cntNotMin==0 && minDis==0){
				System.out.println(1);
				System.out.print(a[0]);
			}
		}
		br.close();
	}

}


import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.awt.Point;
import java.math.BigInteger;

import static java.lang.Math.*;

public class CodeforcesC implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public static void main(String[] args) {
        new Thread(null, new CodeforcesC(), "", 128 * (1L << 20)).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    void debug(Object... objects) {
        if (DEBUG) {
            for (Object o : objects) {
                System.err.println(o.toString());
            }
        }
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            time();
            memory();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    boolean DEBUG = false;

    void solve() throws IOException {

        int n = readInt();
        Integer[] a = new Integer[n];

        for (int i = 0; i < n; i++)
            a[i] = readInt();

        Arrays.sort(a);

        if (n == 1) {
            out.println(-1);
            return;
        }

        if (n == 2) {
            TreeSet<Integer> set = new TreeSet<Integer>();
            int dim = a[1] - a[0];
            set.add(a[0] - dim);
            set.add(a[1] + dim);
            if ((a[0] + a[1]) % 2 == 0)
                set.add((a[0] + a[1]) / 2);

            out.println(set.size());
            for (int x : set) out.print(x+" ");

            return;
        }

        int[] d = new int[n];

        for (int i = 0; i < n - 1; i++)
            d[i] = a[i + 1] - a[i];

        int[] dd = new int[n - 1];
        for (int i = 0; i < n - 1; i++)
            dd[i] = d[i];

        Arrays.sort(dd);

        boolean good = true;

        for (int i = 1; i < n - 2; i++) {
            if (dd[i] != dd[i - 1])
                good = false;
        }

        if (!good) {
            out.println(0);
            return;
        }

        good &= (dd[n - 2] == dd[n - 3]);

        if (good) {
            int dim = dd[0];

            if (dd[0]==0) {
                out.println(1);
                out.println(a[0]);
                return;
            }

            out.println(2);
            out.println((a[0] - dim) + " " + (a[n - 1] + dim));
            return;
        }

        if (dd[n-2]!=2*dd[n-3]) {
            out.println(0);
            return;
        }

        out.println(1);
        int x = dd[n - 2];

        int idx = 0;

        for (int i = 0; i < n - 1; i++) {
            if (d[i] == x)
                idx = i;
        }

        out.println((a[idx] + a[idx + 1]) / 2);

    }
}


import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.awt.Point;
import java.math.BigInteger;

import static java.lang.Math.*;

public class CodeforcesC implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public static void main(String[] args) {
        new Thread(null, new CodeforcesC(), "", 128 * (1L << 20)).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    void debug(Object... objects) {
        if (DEBUG) {
            for (Object o : objects) {
                System.err.println(o.toString());
            }
        }
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            time();
            memory();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    boolean DEBUG = false;

    void solve() throws IOException {

        int n = readInt();
        Integer[] a = new Integer[n];

        for (int i = 0; i < n; i++)
            a[i] = readInt();

        Arrays.sort(a);

        if (n == 1) {
            out.println(-1);
            return;
        }

        if (n == 2) {
            TreeSet<Integer> set = new TreeSet<Integer>();
            int dim = a[1] - a[0];
            set.add(a[0] - dim);
            set.add(a[1] + dim);
            if ((a[0] + a[1]) % 2 == 0)
                set.add((a[0] + a[1]) / 2);

            out.println(set.size());
            for (int x : set) out.print(x+" ");

            return;
        }

        int[] d = new int[n];

        for (int i = 0; i < n - 1; i++)
            d[i] = a[i + 1] - a[i];

        int[] dd = new int[n - 1];
        for (int i = 0; i < n - 1; i++)
            dd[i] = d[i];

        Arrays.sort(dd);

        boolean good = true;

        for (int i = 1; i < n - 2; i++) {
            if (dd[i] != dd[i - 1])
                good = false;
        }

        if (!good) {
            out.println(0);
            return;
        }

        good &= (dd[n - 2] == dd[n - 3]);

        if (good) {
            int dim = dd[0];
            out.println(2);
            out.println((a[0] - dim) + " " + (a[n - 1] + dim));
            return;
        }

        if (dd[n-2]!=2*dd[n-3]) {
            out.println(0);
            return;
        }

        out.println(1);
        int x = dd[n - 2];

        int idx = 0;

        for (int i = 0; i < n - 1; i++) {
            if (d[i] == x)
                idx = i;
        }

        out.println((a[idx] + a[idx + 1]) / 2);

    }
}


import java.util.*;

public class ArithmeticProgression382C
{
    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        // System.out.println("Enter n");
        int n = sc.nextInt();

        if (n==1)
        {
            System.out.println(-1);
            return;
        }

        int[] a = new int[n];
        for (int i=0; i<n; i++)
        {
            // System.out.println("Enter next number");
            a[i] = sc.nextInt();
        }

        Arrays.sort(a);

        if (n==2)
        {
            int diff = a[1]-a[0];
            if (diff == 0)    // Both the same number
            {
                System.out.println(1);
                System.out.println(a[0]);
                return;
            }
            if (diff % 2 == 0)
            {
                System.out.println(3);
                System.out.print((a[0]-diff) + " ");
                System.out.print(((a[0]+a[1])/2) + " ");
                System.out.println(a[1] + diff);
                return;
            }
            else
            {
                System.out.println(2);
                System.out.print((a[0]-diff) + " ");
                System.out.println(a[1] + diff);
                return;
            }
        }

        if (n==3)
        {
            int diffone = a[1]-a[0];
            int difftwo = a[2]-a[1];
            if (diffone == difftwo)   // An arith progression to start with
            {
                if (diffone == 0)     // All the same number
                {
                   System.out.println(1);
                   System.out.println(a[0]);
                   return;
                }
                else
                {
                    System.out.println(2);
                    System.out.print((a[0]-diffone) + " ");
                    System.out.println(a[2] + diffone);
                    return;
                }
            }
            else     // One difference must be half the other for one
            {
                if (diffone * 2 == difftwo)
                {
                    System.out.println(1);
                    System.out.println((a[1] + a[2])/2);
                    return;
                }
                else if (difftwo * 2 == diffone)
                {
                    System.out.println(1);
                    System.out.println((a[0] + a[1])/2);
                    return;
                }
                else
                {
                    System.out.println(0);
                    return;
                }
            }
        }
        // General case--all gaps must be equal except one twice the size of all others
        // Try two loops first, as that is the easiest to code up
        Set<Integer> gaps = new HashSet<Integer>();
        for (int i=0; i<n-1; i++)
        {
            gaps.add(a[i+1]-a[i]);
        }

        if (gaps.size() > 2)    // More than 2 gaps--can't do it
        {
            System.out.println(0);
            return;
        }
        if (gaps.size() == 1)  // All the same gap--either 1 or 2
        {
            int diff = a[1]-a[0];
            if (diff == 0)   //  All numbers the same
            {
                System.out.println(1);
                System.out.println(a[0]);
                return;
            }
            else       // Already an arithmetic sequence--can add at each end
            {
                System.out.println(2);
                System.out.print((a[0]-diff) + " ");
                System.out.println(a[n-1]+diff);
                return;
            }
        }

        // The hard case--exactly two unequal gap sizes
        int j=0;
        int gapone=-1;
        int gaptwo=-1;
        // System.out.println("In the two unequal gap size case");
        for (Integer x: gaps)
        {
            if (j==0)
            {
                gapone = x;
            }
            else
            {
                gaptwo = x;
            }
            j++;
        }
        int biggap = Math.max(gapone, gaptwo);
        int smallgap = Math.min(gapone, gaptwo);
        // System.out.println("The gaps are " + smallgap + " and " + biggap);
        if (smallgap * 2 != biggap)    // Big one must be twice the small one
        {
            System.out.println(0);
            return;
        }
        // Find out which one occurs only once--THE BIG ONE MUST BE THE SINGLETON
        int biggapcount = 0;
        int smallgapcount = 0;
        int one = a[1] - a[0];
        if (one == biggap)
        {
            biggapcount++;
        }
        else
        {
            smallgapcount++;
        }
        int two = a[2] - a[1];
        if (two == biggap)
        {
            biggapcount++;
        }
        else
        {
            smallgapcount++;
        }
        int three = a[3] - a[2];
        if (three == biggap)
        {
            biggapcount++;
        }
        else
        {
            smallgapcount++;
        }

        if (biggapcount > 1)
        {
            System.out.println(0);
            return;
        }

        // If we get here, the bigger gap only occured once
        // Find where it is and fill it in
        // System.out.println("The singleton bigger gap is " + biggap);
        for (int i=0; i<n-1; i++)
        {
            if (a[i+1] - a[i] == biggap)
            {
                if (n==298)
                {
                    System.out.println(1 + " its here");
                }
                else
                {
                    System.out.println(1);
                }
                System.out.println((a[i+1] + a[i])/2);
                return;
            }
        }
    }
}


import java.util.*;

public class ArithmeticProgression382C
{
    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        // System.out.println("Enter n");
        int n = sc.nextInt();

        if (n==1)
        {
            System.out.println(-1);
            return;
        }

        int[] a = new int[n];
        for (int i=0; i<n; i++)
        {
            // System.out.println("Enter next number");
            a[i] = sc.nextInt();
        }

        Arrays.sort(a);

        if (n==2)
        {
            int diff = a[1]-a[0];
            if (diff == 0)    // Both the same number
            {
                System.out.println(1);
                System.out.println(a[0]);
                return;
            }
            if (diff % 2 == 0)
            {
                System.out.println(3);
                System.out.print((a[0]-diff) + " ");
                System.out.print(((a[0]+a[1])/2) + " ");
                System.out.println(a[1] + diff);
                return;
            }
            else
            {
                System.out.println(2);
                System.out.print((a[0]-diff) + " ");
                System.out.println(a[1] + diff);
                return;
            }
        }

        if (n==3)
        {
            int diffone = a[1]-a[0];
            int difftwo = a[2]-a[1];
            if (diffone == difftwo)   // An arith progression to start with
            {
                if (diffone == 0)     // All the same number
                {
                   System.out.println(1);
                   System.out.println(a[0]);
                   return;
                }
                else
                {
                    System.out.println(2);
                    System.out.print((a[0]-diffone) + " ");
                    System.out.println(a[2] + diffone);
                    return;
                }
            }
            else     // One difference must be half the other for one
            {
                if (diffone * 2 == difftwo)
                {
                    System.out.println(1);
                    System.out.println((a[1] + a[2])/2);
                    return;
                }
                else if (difftwo * 2 == diffone)
                {
                    System.out.println(1);
                    System.out.println((a[0] + a[1])/2);
                    return;
                }
                else
                {
                    System.out.println(0);
                    return;
                }
            }
        }
        // General case--all gaps must be equal except one twice the size of all others
        // Try two loops first, as that is the easiest to code up
        Set<Integer> gaps = new HashSet<Integer>();
        for (int i=0; i<n-1; i++)
        {
            gaps.add(a[i+1]-a[i]);
        }

        if (gaps.size() > 2)    // More than 2 gaps--can't do it
        {
            System.out.println(0);
            return;
        }
        if (gaps.size() == 1)  // All the same gap--either 1 or 2
        {
            int diff = a[1]-a[0];
            if (diff == 0)   //  All numbers the same
            {
                System.out.println(1);
                System.out.println(a[0]);
                return;
            }
            else       // Already an arithmetic sequence--can add at each end
            {
                System.out.println(2);
                System.out.print((a[0]-diff) + " ");
                System.out.println(a[n-1]+diff);
                return;
            }
        }

        // The hard case--exactly two unequal gap sizes
        int j=0;
        int gapone=-1;
        int gaptwo=-1;
        // System.out.println("In the two unequal gap size case");
        for (Integer x: gaps)
        {
            if (j==0)
            {
                gapone = x;
            }
            else
            {
                gaptwo = x;
            }
            j++;
        }
        int biggap = Math.max(gapone, gaptwo);
        int smallgap = Math.min(gapone, gaptwo);
        // System.out.println("The gaps are " + smallgap + " and " + biggap);
        if (smallgap * 2 != biggap)    // Big one must be twice the small one
        {
            System.out.println(0);
            return;
        }
        // Find out which one occurs only once--THE BIG ONE MUST BE THE SINGLETON
        int biggapcount = 0;
        int smallgapcount = 0;
        int one = a[1] - a[0];
        if (one == biggap)
        {
            biggapcount++;
        }
        else
        {
            smallgapcount++;
        }
        int two = a[2] - a[1];
        if (two == biggap)
        {
            biggapcount++;
        }
        else
        {
            smallgapcount++;
        }
        int three = a[3] - a[2];
        if (three == biggap)
        {
            biggapcount++;
        }
        else
        {
            smallgapcount++;
        }

        if (biggapcount > 1)
        {
            System.out.println(0);
            return;
        }

        // If we get here, the bigger gap only occured once
        // Find where it is and fill it in
        // System.out.println("The singleton bigger gap is " + biggap);
        System.out.println(1);    // One answer
        for (int i=0; i<n-1; i++)
        {
            if (a[i+1] - a[i] == biggap)
            {
                System.out.println((a[i+1] + a[i])/2);
                return;
            }
        }
    }
}