#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iterator>

using namespace std;

int main()
{
	int n,nClone;
	scanf("%d" , &n);
	nClone=n;
	long temp;
	vector<long> array;
	while(nClone--)
	{
		scanf("%d" , &temp);
		array.push_back(temp);
	}
	sort(array.begin() , array.end());

	/*
	for(int i=0;i<array.size();i++)
	{
		cout<<array[i]<<" ";
	}

	*/
	if(array.size() ==1 || array.size() == 0)
	{
		cout<<-1<<endl;
	}
	else if(array.size() == 2)
	{
		int diff =array[1] -array[0];
		if(diff==0) cout<<1<<array[0]<<endl;
		else if (diff%2 ==0) cout<<3<<endl<<array[0]-diff<<" "<<( 0.5*(array[0]+array[1]) )<<" "<<array[1]+diff<<endl;
		else cout<<2<<endl<<array[0]-diff<<" "<<array[1]+diff<<endl;;
	}

	else
	{
		int * difference = new int[n-1];
		for(int j=0;j<n-1;j++)
		{
			difference[j] = array[j+1] - array[j];
		}

		/*

		cout<<endl<<n-1<<endl;
		for(int j=0;j<n-1;j++)
		{
			cout<<difference[j]<<" ";
		}

		*/

		cout<<endl;
		bool allZero=true;
		bool allEqual=true;
		int min=difference[0];
		vector<int> variety;
		vector<int> frequency;
		for (int i=0;i<n-1;i++)
		{
			if(allZero == true)
			{
				if(difference[i] != 0) allZero = false;
			}

			if(allEqual == true && i<n-2)
			{
				if(difference[i] !=difference[i+1]) allEqual = false;
			}

			if (difference[i] < min) min=difference[i];

			if(variety.size() < 3)
			{
				if(find(variety.begin() , variety.end() , difference[i]) == variety.end())
				{
					variety.push_back(difference[i]);
					frequency.push_back(1);
				}
				else
				{
					vector<int>::iterator temp = find(variety.begin() , variety.end() , difference[i]);
					int diff=distance(variety.begin() , temp);

				/*	while(temp != variety.begin())
					{
						temp = prev(temp);
						diff++;
					}
				*/
					frequency[diff]++;

				}
			}
		}
		if(variety.size() == 3) cout<<0<<endl;
		else if(allZero==true) cout<<1<<endl<<array[0]<<endl;
		else if(allEqual==true) cout<<2<<endl<<array[0] - difference[0]<<" "<<array[n-1] + difference[0]<<endl;
		else if((frequency[0] >1 && frequency [1] >1) || frequency[0] >1 && variety[0]>variety[1] || frequency[1]>1 && variety[1] >variety[0]) cout<<0<<endl;
		else if(frequency[0]>1 && variety[1] != 2*variety[0] || frequency[1]>1 && variety[0] != 2*variety[1] )
		{
		cout<<0<<endl;
		}//cout<<"Control 1"<<endl;}
		else
		{
			//cout<<"Control reached"<<endl;
			//cout<<1<<endl;//<<endl<<array[0]-frequency[0]<<" ";
			if(frequency [0] >1)
			{
				cout<<1<<endl;//<<array[0]-frequency[0]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[1])
					{
						cout<<array[j] + variety[0]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[0];
			}
			if(frequency [1] >1)
			{
				cout<<1<<endl;//<<endl<<array[0]-frequency[1]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[0])
					{
						cout<<array[j] + variety[1]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[1];
			}
		}
		cout<<endl;

		/*

		cout<<"array.size(): "<<array.size()<<endl<<"variety.size(): "<<variety.size()<<endl<<"allZero: "<<allZero<<endl<<"allEqual: "<<allEqual<<endl;
		cout<<variety[0]<<" "<<frequency[0]<<endl;
		cout<<variety[1]<<" "<<frequency[1]<<endl;
		cout<<(frequency[0] > 1)<<endl;
		cout<<(frequency[1] != 2*frequency[0])<<endl;
		cout<<frequency[1]<<" != "<<2*frequency[0]<<endl;
		cout<<"frequency[0]>1 && frequency[1] != 2*frequency[0] : "<<(frequency[0] > 1 && frequency[1] != 2*frequency[0])<<endl;
		*/

	}

}


#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iterator>

using namespace std;

int main()
{
	int n,nClone;
	scanf("%d" , &n);
	nClone=n;
	long temp;
	vector<long> array;
	while(nClone--)
	{
		scanf("%d" , &temp);
		array.push_back(temp);
	}
	sort(array.begin() , array.end());

	/*
	for(int i=0;i<array.size();i++)
	{
		cout<<array[i]<<" ";
	}

	*/
	if(array.size() ==1 || array.size() == 0)
	{
		cout<<-1<<endl;
	}
	else if(array.size() == 2)
	{
		int diff =array[1] -array[0];
		if(diff==0) cout<<1;
		else if (diff%2 ==0) cout<<3<<endl<<array[0]-diff<<" "<<( 0.5*(array[0]+array[1]) )<<" "<<array[1]+diff<<endl;
		else cout<<2<<endl<<array[0]-diff<<" "<<array[1]+diff<<endl;;
	}

	else
	{
		int * difference = new int[n-1];
		for(int j=0;j<n-1;j++)
		{
			difference[j] = array[j+1] - array[j];
		}
		cout<<endl<<n-1<<endl;
		for(int j=0;j<n-1;j++)
		{
			cout<<difference[j]<<" ";
		}

		cout<<endl;
		bool allZero=true;
		bool allEqual=true;
		int min=difference[0];
		vector<int> variety;
		vector<int> frequency;
		for (int i=0;i<n-1;i++)
		{
			if(allZero == true)
			{
				if(difference[i] != 0) allZero = false;
			}

			if(allEqual == true && i<n-2)
			{
				if(difference[i] !=difference[i+1]) allEqual = false;
			}

			if (difference[i] < min) min=difference[i];

			if(variety.size() < 3)
			{
				if(find(variety.begin() , variety.end() , difference[i]) == variety.end())
				{
					variety.push_back(difference[i]);
					frequency.push_back(1);
				}
				else
				{
					vector<int>::iterator temp = find(variety.begin() , variety.end() , difference[i]);
					int diff=distance(variety.begin() , temp);

				/*	while(temp != variety.begin())
					{
						temp = prev(temp);
						diff++;
					}
				*/
					frequency[diff]++;

				}
			}
		}
		if(variety.size() == 3) cout<<0<<endl;
		else if(allZero==true) cout<<1<<endl<<array[0]<<endl;
		else if(allEqual==true) cout<<2<<endl<<array[0] - difference[0]<<" "<<array[n-1] + difference[0]<<endl;
		else if((frequency[0] >1 && frequency [1] >1) || frequency[0] >1 && variety[0]>variety[1] || frequency[1]>1 && variety[1] >variety[0]) cout<<0<<endl;
		else if(frequency[0]>1 && variety[1] != 2*variety[0] || frequency[1]>1 && variety[0] != 2*variety[1] )
		{
		cout<<0<<endl;
		}//cout<<"Control 1"<<endl;}
		else
		{
			//cout<<"Control reached"<<endl;
			//cout<<1<<endl;//<<endl<<array[0]-frequency[0]<<" ";
			if(frequency [0] >1)
			{
				cout<<1<<endl;//<<array[0]-frequency[0]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[1])
					{
						cout<<array[j] + variety[0]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[0];
			}
			if(frequency [1] >1)
			{
				cout<<1<<endl;//<<endl<<array[0]-frequency[1]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[0])
					{
						cout<<array[j+1] + variety[1]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[1];
			}
		}
		cout<<endl;

		cout<<"array.size(): "<<array.size()<<endl<<"variety.size(): "<<variety.size()<<endl<<"allZero: "<<allZero<<endl<<"allEqual: "<<allEqual<<endl;
		cout<<variety[0]<<" "<<frequency[0]<<endl;
		cout<<variety[1]<<" "<<frequency[1]<<endl;
		cout<<(frequency[0] > 1)<<endl;
		cout<<(frequency[1] != 2*frequency[0])<<endl;
		cout<<frequency[1]<<" != "<<2*frequency[0]<<endl;
		cout<<"frequency[0]>1 && frequency[1] != 2*frequency[0] : "<<(frequency[0] > 1 && frequency[1] != 2*frequency[0])<<endl;

	}

}


#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iterator>

using namespace std;

int main()
{
	int n,nClone;
	scanf("%d" , &n);
	nClone=n;
	long temp;
	vector<long> array;
	while(nClone--)
	{
		scanf("%d" , &temp);
		array.push_back(temp);
	}
	sort(array.begin() , array.end());

	/*
	for(int i=0;i<array.size();i++)
	{
		cout<<array[i]<<" ";
	}

	*/
	if(array.size() ==1 || array.size() == 0)
	{
		cout<<-1<<endl;
	}
	else if(array.size() == 2)
	{
		int diff =array[1] -array[0];
		if(diff==0) cout<<1<<endl<<array[0]<<endl;
		else if (diff%2 ==0) cout<<3<<endl<<array[0]-diff<<" "<<( 0.5*(array[0]+array[1]) )<<" "<<array[1]+diff<<endl;
		else cout<<2<<endl<<array[0]-diff<<" "<<array[1]+diff<<endl;;
	}
	else if(array.size() == 3)
	{
		int diffO=array[1] -array[0];
		int diffT = array[2] -array[1];
		if(diffO==diffT)
		{
			if(diffO==0) cout<<1<<endl<<array[0]<<endl;
			else cout<<2<<endl<<array[0]-diffO<<" "<<array[2]+diffO<<endl;
		}
		else if(diffO<diffT)
		{
			if(diffT=2*diffO) cout<<1<<endl<<(array[1]+array[2])*0.5<<endl;
		}
		else if(diffO>diffT)
		{
			if(diffO=2*diffT) cout<<1<<endl<<(array[0]+array[1])*0.5<<endl;
		}
		else
		{
			cout<<0<<endl;
		}
	}

	else
	{
		int * difference = new int[n-1];
		for(int j=0;j<n-1;j++)
		{
			difference[j] = array[j+1] - array[j];
		}

		/*

		cout<<endl<<n-1<<endl;
		for(int j=0;j<n-1;j++)
		{
			cout<<difference[j]<<" ";
		}

		*/

		cout<<endl;
		bool allZero=true;
		bool allEqual=true;
		int min=difference[0];
		vector<int> variety;
		vector<int> frequency;
		for (int i=0;i<n-1;i++)
		{
			if(allZero == true)
			{
				if(difference[i] != 0) allZero = false;
			}

			if(allEqual == true && i<n-2)
			{
				if(difference[i] !=difference[i+1]) allEqual = false;
			}

			if (difference[i] < min) min=difference[i];

			if(variety.size() < 3)
			{
				if(find(variety.begin() , variety.end() , difference[i]) == variety.end())
				{
					variety.push_back(difference[i]);
					frequency.push_back(1);
				}
				else
				{
					vector<int>::iterator temp = find(variety.begin() , variety.end() , difference[i]);
					int diff=distance(variety.begin() , temp);

				/*	while(temp != variety.begin())
					{
						temp = prev(temp);
						diff++;
					}
				*/
					frequency[diff]++;

				}
			}
		}
		if(variety.size() == 3) cout<<0<<endl;
		else if(allZero==true) cout<<1<<endl<<array[0]<<endl;
		else if(allEqual==true) cout<<2<<endl<<array[0] - difference[0]<<" "<<array[n-1] + difference[0]<<endl;
		else if((frequency[0] >1 && frequency [1] >1) || frequency[0] >1 && variety[0]>variety[1] || frequency[1]>1 && variety[1] >variety[0]) cout<<0<<endl;
		else if(frequency[0]>1 && variety[1] != 2*variety[0] || frequency[1]>1 && variety[0] != 2*variety[1] )
		{
		cout<<0<<endl;
		}//cout<<"Control 1"<<endl;}
		else
		{
			//cout<<"Control reached"<<endl;
			//cout<<1<<endl;//<<endl<<array[0]-frequency[0]<<" ";
			if(frequency [0] >1)
			{
				cout<<1<<endl;//<<array[0]-frequency[0]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[1])
					{
						cout<<array[j] + variety[0]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[0];
			}
			if(frequency [1] >1)
			{
				cout<<1<<endl;//<<endl<<array[0]-frequency[1]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[0])
					{
						cout<<array[j] + variety[1]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[1];
			}
		}
		cout<<endl;

		/*

		cout<<"array.size(): "<<array.size()<<endl<<"variety.size(): "<<variety.size()<<endl<<"allZero: "<<allZero<<endl<<"allEqual: "<<allEqual<<endl;
		cout<<variety[0]<<" "<<frequency[0]<<endl;
		cout<<variety[1]<<" "<<frequency[1]<<endl;
		cout<<(frequency[0] > 1)<<endl;
		cout<<(frequency[1] != 2*frequency[0])<<endl;
		cout<<frequency[1]<<" != "<<2*frequency[0]<<endl;
		cout<<"frequency[0]>1 && frequency[1] != 2*frequency[0] : "<<(frequency[0] > 1 && frequency[1] != 2*frequency[0])<<endl;
		*/

	}

}


#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iterator>
#include<iomanip>
using namespace std;

int main()
{
	cout.setf(ios::fixed);
	long n,nClone;
	scanf("%d" , &n);
	nClone=n;
	long temp;
	vector<long> array;
	while(nClone--)
	{
		scanf("%d" , &temp);
		array.push_back(temp);
	}
	sort(array.begin() , array.end());

	/*
	for(long i=0;i<array.size();i++)
	{
		cout<<array[i]<<" ";
	}

	*/
	if(array.size() ==1 || array.size() == 0)
	{
		cout<<-1<<endl;
	}
	else if(array.size() == 2)
	{
		long diff =array[1] -array[0];
		if(diff==0) cout<<1<<endl<<array[0]<<endl;
		else if (diff%2 ==0) cout<<3<<endl<<setprecision(0)<<array[0]-diff<<" "<<setprecision(0)<<( array[0] + diff*0.5 )<<" "<<setprecision(0)<<array[1]+diff<<endl;
		else cout<<2<<endl<<setprecision(0)<<array[0]-diff<<" "<<setprecision(0)<<array[1]+diff<<endl;;
	}
	else if(array.size() == 3)
	{
		long diffO=array[1] -array[0];
		long diffT = array[2] -array[1];
		if(diffO==diffT)
		{
			if(diffO==0) cout<<1<<endl<<array[0]<<endl;
			else cout<<2<<endl<<setprecision(0)<<array[0]-diffO<<" "<<setprecision(0)<<array[2]+diffO<<endl;
		}
		else if(diffO<diffT)
		{
			if(diffT=2*diffO) cout<<1<<endl<<setprecision(0)<<array[1]+ diffO<<endl;
		}
		else if(diffO>diffT)
		{
			if(diffO=2*diffT) cout<<1<<endl<<setprecision(0)<<array[0]+diffT<<endl;
		}
		else
		{
			cout<<0<<endl;
		}
	}

	else
	{
		long * difference = new long[n-1];
		for(long j=0;j<n-1;j++)
		{
			difference[j] = array[j+1] - array[j];
		}

		/*

		cout<<endl<<n-1<<endl;
		for(long j=0;j<n-1;j++)
		{
			cout<<difference[j]<<" ";
		}

		*/

		cout<<endl;
		bool allZero=true;
		bool allEqual=true;
		long min=difference[0];
		vector<long> variety;
		vector<long> frequency;
		for (long i=0;i<n-1;i++)
		{
			if(allZero == true)
			{
				if(difference[i] != 0) allZero = false;
			}

			if(allEqual == true && i<n-2)
			{
				if(difference[i] !=difference[i+1]) allEqual = false;
			}

			if (difference[i] < min) min=difference[i];

			if(variety.size() < 3)
			{
				if(find(variety.begin() , variety.end() , difference[i]) == variety.end())
				{
					variety.push_back(difference[i]);
					frequency.push_back(1);
				}
				else
				{
					vector<long>::iterator temp = find(variety.begin() , variety.end() , difference[i]);
					long diff=distance(variety.begin() , temp);

				/*	while(temp != variety.begin())
					{
						temp = prev(temp);
						diff++;
					}
				*/
					frequency[diff]++;

				}
			}
		}
		if(variety.size() == 3) cout<<0<<endl;
		else if(allZero==true) cout<<1<<endl<<array[0]<<endl;
		else if(allEqual==true) cout<<2<<endl<<array[0] - difference[0]<<" "<<array[n-1] + difference[0]<<endl;
		else if((frequency[0] >1 && frequency [1] >1) || frequency[0] >1 && variety[0]>variety[1] || frequency[1]>1 && variety[1] >variety[0]) cout<<0<<endl;
		else if(frequency[0]>1 && variety[1] != 2*variety[0] || frequency[1]>1 && variety[0] != 2*variety[1] )
		{
		cout<<0<<endl;
		}//cout<<"Control 1"<<endl;}
		else
		{
			//cout<<"Control reached"<<endl;
			//cout<<1<<endl;//<<endl<<array[0]-frequency[0]<<" ";
			if(frequency [0] >1)
			{
				cout<<1<<endl;//<<array[0]-frequency[0]<<" ";
				for(long j=0;j<n-1;j++)
				{
					if(difference[j] == variety[1])
					{
						cout<<array[j] + variety[0]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[0];
			}
			if(frequency [1] >1)
			{
				cout<<1<<endl;//<<endl<<array[0]-frequency[1]<<" ";
				for(long j=0;j<n-1;j++)
				{
					if(difference[j] == variety[0])
					{
						cout<<array[j] + variety[1]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[1];
			}
		}
		cout<<endl;

		/*

		cout<<"array.size(): "<<array.size()<<endl<<"variety.size(): "<<variety.size()<<endl<<"allZero: "<<allZero<<endl<<"allEqual: "<<allEqual<<endl;
		cout<<variety[0]<<" "<<frequency[0]<<endl;
		cout<<variety[1]<<" "<<frequency[1]<<endl;
		cout<<(frequency[0] > 1)<<endl;
		cout<<(frequency[1] != 2*frequency[0])<<endl;
		cout<<frequency[1]<<" != "<<2*frequency[0]<<endl;
		cout<<"frequency[0]>1 && frequency[1] != 2*frequency[0] : "<<(frequency[0] > 1 && frequency[1] != 2*frequency[0])<<endl;
		*/

	}

}


#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iterator>

using namespace std;

int main()
{
	int n,nClone;
	scanf("%d" , &n);
	nClone=n;
	long temp;
	vector<long> array;
	while(nClone--)
	{
		scanf("%d" , &temp);
		array.push_back(temp);
	}
	sort(array.begin() , array.end());

	/*
	for(int i=0;i<array.size();i++)
	{
		cout<<array[i]<<" ";
	}

	*/
	if(array.size() ==1 || array.size() == 0)
	{
		cout<<-1<<endl;
	}
	else if(array.size() == 2)
	{
		int diff =array[1] -array[0];
		if(diff==0) cout<<1;
		else if (diff%2 ==0) cout<<3<<endl<<array[0]-diff<<" "<<( 0.5*(array[0]+array[1]) )<<" "<<array[1]+diff<<endl;
		else cout<<2<<endl<<array[0]-diff<<" "<<array[1]+diff<<endl;;
	}

	else
	{
		int * difference = new int[n-1];
		for(int j=0;j<n-1;j++)
		{
			difference[j] = array[j+1] - array[j];
		}
		/*
		cout<<endl<<n-1<<endl;
		for(int j=0;j<n-1;j++)
		{
			cout<<difference[j]<<" ";
		}*/

		cout<<endl;
		bool allZero=true;
		bool allEqual=true;
		int min=difference[0];
		vector<int> variety;
		vector<int> frequency;
		for (int i=0;i<n-1;i++)
		{
			if(allZero == true)
			{
				if(difference[i] != 0) allZero = false;
			}

			if(allEqual == true && i<n-2)
			{
				if(difference[i] !=difference[i+1]) allEqual = false;
			}

			if (difference[i] < min) min=difference[i];

			if(variety.size() < 3)
			{
				if(find(variety.begin() , variety.end() , difference[i]) == variety.end())
				{
					variety.push_back(difference[i]);
					frequency.push_back(1);
				}
				else
				{
					vector<int>::iterator temp = find(variety.begin() , variety.end() , difference[i]);
					int diff=distance(variety.begin() , temp);

				/*	while(temp != variety.begin())
					{
						temp = prev(temp);
						diff++;
					}
				*/
					frequency[diff]++;

				}
			}
		}
		if(variety.size() == 3) cout<<0<<endl;
		else if(allZero==true) cout<<1<<endl<<array[0]<<endl;
		else if(allEqual==true) cout<<2<<endl<<array[0] - difference[0]<<" "<<array[n-1] + difference[0]<<endl;
		else if((frequency[0] >1 && frequency [1] >1) || frequency[0] >1 && variety[0]>variety[1] || frequency[1]>1 && variety[1] >variety[0]) cout<<0<<endl;
		else if(frequency[0]>1 && variety[1] != 2*variety[0] || frequency[1]>1 && variety[0] != 2*variety[1] )
		{
		cout<<0<<endl;
		}//cout<<"Control 1"<<endl;}
		else
		{
			//cout<<"Control reached"<<endl;
			//cout<<1<<endl;//<<endl<<array[0]-frequency[0]<<" ";
			if(frequency [0] >1)
			{
				cout<<1<<endl;//<<array[0]-frequency[0]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[1])
					{
						cout<<array[j] + variety[0]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[0];
			}
			if(frequency [1] >1)
			{
				cout<<1<<endl;//<<endl<<array[0]-frequency[1]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[0])
					{
						cout<<array[j+1] + variety[1]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[1];
			}
		}
		cout<<endl;

		/*
		cout<<"array.size(): "<<array.size()<<endl<<"variety.size(): "<<variety.size()<<endl<<"allZero: "<<allZero<<endl<<"allEqual: "<<allEqual<<endl;
		cout<<variety[0]<<" "<<frequency[0]<<endl;
		cout<<variety[1]<<" "<<frequency[1]<<endl;
		cout<<(frequency[0] > 1)<<endl;
		cout<<(frequency[1] != 2*frequency[0])<<endl;
		cout<<frequency[1]<<" != "<<2*frequency[0]<<endl;
		cout<<"frequency[0]>1 && frequency[1] != 2*frequency[0] : "<<(frequency[0] > 1 && frequency[1] != 2*frequency[0])<<endl;
		*/
	}

}


#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iterator>

using namespace std;

int main()
{
	int n,nClone;
	scanf("%d" , &n);
	nClone=n;
	long temp;
	vector<long> array;
	while(nClone--)
	{
		scanf("%d" , &temp);
		array.push_back(temp);
	}
	sort(array.begin() , array.end());

	/*
	for(int i=0;i<array.size();i++)
	{
		cout<<array[i]<<" ";
	}

	*/
	if(array.size() ==1 || array.size() == 0)
	{
		cout<<-1<<endl;
	}
	else if(array.size() == 2)
	{
		int diff =array[1] -array[0];
		if(diff==0) cout<<1;
		else if (diff%2 ==0) cout<<3<<endl<<array[0]-diff<<" "<<( 0.5*(array[0]+array[1]) )<<" "<<array[1]+diff<<endl;
		else cout<<2<<endl<<array[0]-diff<<" "<<array[1]+diff<<endl;;
	}

	else
	{
		int * difference = new int[n-1];
		for(int j=0;j<n-1;j++)
		{
			difference[j] = array[j+1] - array[j];
		}

		/*

		cout<<endl<<n-1<<endl;
		for(int j=0;j<n-1;j++)
		{
			cout<<difference[j]<<" ";
		}

		*/

		cout<<endl;
		bool allZero=true;
		bool allEqual=true;
		int min=difference[0];
		vector<int> variety;
		vector<int> frequency;
		for (int i=0;i<n-1;i++)
		{
			if(allZero == true)
			{
				if(difference[i] != 0) allZero = false;
			}

			if(allEqual == true && i<n-2)
			{
				if(difference[i] !=difference[i+1]) allEqual = false;
			}

			if (difference[i] < min) min=difference[i];

			if(variety.size() < 3)
			{
				if(find(variety.begin() , variety.end() , difference[i]) == variety.end())
				{
					variety.push_back(difference[i]);
					frequency.push_back(1);
				}
				else
				{
					vector<int>::iterator temp = find(variety.begin() , variety.end() , difference[i]);
					int diff=distance(variety.begin() , temp);

				/*	while(temp != variety.begin())
					{
						temp = prev(temp);
						diff++;
					}
				*/
					frequency[diff]++;

				}
			}
		}
		if(variety.size() == 3) cout<<0<<endl;
		else if(allZero==true) cout<<1<<endl<<array[0]<<endl;
		else if(allEqual==true) cout<<2<<endl<<array[0] - difference[0]<<" "<<array[n-1] + difference[0]<<endl;
		else if((frequency[0] >1 && frequency [1] >1) || frequency[0] >1 && variety[0]>variety[1] || frequency[1]>1 && variety[1] >variety[0]) cout<<0<<endl;
		else if(frequency[0]>1 && variety[1] != 2*variety[0] || frequency[1]>1 && variety[0] != 2*variety[1] )
		{
		cout<<0<<endl;
		}//cout<<"Control 1"<<endl;}
		else
		{
			//cout<<"Control reached"<<endl;
			//cout<<1<<endl;//<<endl<<array[0]-frequency[0]<<" ";
			if(frequency [0] >1)
			{
				cout<<1<<endl;//<<array[0]-frequency[0]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[1])
					{
						cout<<array[j] + variety[0]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[0];
			}
			if(frequency [1] >1)
			{
				cout<<1<<endl;//<<endl<<array[0]-frequency[1]<<" ";
				for(int j=0;j<n-1;j++)
				{
					if(difference[j] == variety[0])
					{
						cout<<array[j] + variety[1]<<" ";
						break;
					}
				}
				//cout<<array[n-1]+frequency[1];
			}
		}
		cout<<endl;

		/*

		cout<<"array.size(): "<<array.size()<<endl<<"variety.size(): "<<variety.size()<<endl<<"allZero: "<<allZero<<endl<<"allEqual: "<<allEqual<<endl;
		cout<<variety[0]<<" "<<frequency[0]<<endl;
		cout<<variety[1]<<" "<<frequency[1]<<endl;
		cout<<(frequency[0] > 1)<<endl;
		cout<<(frequency[1] != 2*frequency[0])<<endl;
		cout<<frequency[1]<<" != "<<2*frequency[0]<<endl;
		cout<<"frequency[0]>1 && frequency[1] != 2*frequency[0] : "<<(frequency[0] > 1 && frequency[1] != 2*frequency[0])<<endl;
		*/

	}

}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		ll a[n];
		for(int i = 0; i < n; i++)
    			scanf("%lld", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			ll d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%lld %lld %lld\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else if(d > 0) {
				printf("2\n%lld %lld", a[0]-d, a[1] + d);
			}
			else printf("1\n%lld", a[0]);
			break;
		}

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

		set<ll> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			if(*(s.begin()) == 0) printf("1\n%lld", a[0]);
			else {
				printf("2\n");
				printf("%lld %lld\n", a[0] - dif[0], a[n-1] + dif[0]);
			}
		}
		else if(s.size() == 2) {

			if(*(s.begin()) == 0 || *(++s.begin()) == 0) { printf("0\n"); }

			ll mainDiff, otherDiff, pos;
			int cont1 = 0, cont2 = 0;
			for(int i = 0; i < n-1; i++)
				if(dif[i] == *(s.begin())) cont1++;
				else cont2++;

			mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
			otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

			for(int i = 0; i < n-1; i++)
				if(dif[i] == otherDiff) { pos = i; }

			//printf("%d %d\n", mainDiff, otherDiff);
			if(mainDiff * 2 == otherDiff) {
				printf("1\n");
				printf("%lld", a[pos] + mainDiff);
			}
			else printf("0\n");
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		ll a[n];
		for(int i = 0; i < n; i++)
    		scanf("%lld", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			ll d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%lld %lld %lld\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else if(d > 0) {
				printf("2\n%lld %lld", a[0]-d, a[1] + d);
			}
			else printf("1\n%lld", a[0]);
			break;
		}

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

		set<ll> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			if(*(s.begin()) == 0) printf("1\n%lld", a[0]);
			else {
				printf("2\n");
				printf("%lld %lld\n", a[0] - dif[0], a[n-1] + dif[0]);
			}
		}
		else if(s.size() == 2) {

			ll mainDiff, otherDiff, pos;
			int cont1 = 0, cont2 = 0;
			for(int i = 0; i < n-1; i++)
				if(dif[i] == *(s.begin())) cont1++;
				else cont2++;

			mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
			otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

			for(int i = 0; i < n-1; i++)
				if(dif[i] == otherDiff) { pos = i; }

			//printf("%d %d\n", mainDiff, otherDiff);
			if(mainDiff * 2 == otherDiff) {
				printf("1\n");
				printf("%d", a[pos] + mainDiff);
			}
			else printf("0\n");
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		ll a[n];
		for(int i = 0; i < n; i++)
    			scanf("%lld", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			ll d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%lld %lld %lld\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else if(d > 0) {
				printf("2\n%lld %lld", a[0]-d, a[1] + d);
			}
			else printf("1\n%lld", a[0]);
			break;
		}

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

		set<ll> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			if(*(s.begin()) == 0) printf("1\n%lld", a[0]);
			else {
				printf("2\n");
				printf("%lld %lld\n", a[0] - dif[0], a[n-1] + dif[0]);
			}
		}
		else if(s.size() == 2) {

			if(*(s.begin()) == 0 || *(++s.begin()) == 0) { printf("0\n"); }
			else {
				ll mainDiff, otherDiff, pos;
				int cont1 = 0, cont2 = 0;
				for(int i = 0; i < n-1; i++)
					if(dif[i] == *(s.begin())) cont1++;
					else cont2++;

				mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
				otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

				for(int i = 0; i < n-1; i++)
					if(dif[i] == otherDiff) { pos = i; }

				if((cont1 == 1 || cont2 == 1) && (mainDiff * 2 == otherDiff)) {
					printf("1\n");
					printf("%lld", a[pos] + mainDiff);
				}
				else printf("0\n");
			}
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		ll a[n];
		for(int i = 0; i < n; i++)
    			scanf("%lld", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			ll d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%lld %lld %lld\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else if(d > 0) {
				printf("2\n%lld %lld", a[0]-d, a[1] + d);
			}
			else printf("1\n%lld", a[0]);
			break;
		}

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

		set<ll> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			if(*(s.begin()) == 0) printf("1\n%lld", a[0]);
			else {
				printf("2\n");
				printf("%lld %lld\n", a[0] - dif[0], a[n-1] + dif[0]);
			}
		}
		else if(s.size() == 2) {

			if(*(s.begin()) == 0 || *(++s.begin()) == 0) { printf("0\n"); }
			else {
				ll mainDiff, otherDiff, pos;
				int cont1 = 0, cont2 = 0;
				for(int i = 0; i < n-1; i++)
					if(dif[i] == *(s.begin())) cont1++;
					else cont2++;

				mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
				otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

				for(int i = 0; i < n-1; i++)
					if(dif[i] == otherDiff) { pos = i; }

				//printf("%d %d\n", mainDiff, otherDiff);
				if(mainDiff * 2 == otherDiff) {
					printf("1\n");
					printf("%lld", a[pos] + mainDiff);
				}
				else printf("0\n");
			}
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		int a[n];
		for(int i = 0; i < n; i++)
    		scanf("%d", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			int d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%d %d %d\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else {
				printf("2\n%d %d", a[0]-d, a[1] + d);
			}
			break;
		}

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

		set<int> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			printf("2\n");
			printf("%d %d\n", a[0] - dif[0], a[n-1] + dif[0]);
		}
		else if(s.size() == 2) {

			int mainDiff, otherDiff, pos;
			int cont1 = 0, cont2 = 0;
			for(int i = 0; i < n-1; i++)
				if(dif[i] == *(s.begin())) cont1++;
				else cont2++;

			mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
			otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

			for(int i = 0; i < n-1; i++)
				if(dif[i] == otherDiff) { pos = i; }

			printf("%d %d\n", mainDiff, otherDiff);
			if(mainDiff == otherDiff/2.0) {
				printf("1\n");
				printf("%d", a[pos] + mainDiff);
			}
			else printf("0\n");
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		int a[n];
		for(int i = 0; i < n; i++)
    		scanf("%d", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			int d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%d %d %d\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else if(d > 0) {
				printf("2\n%d %d", a[0]-d, a[1] + d);
			}
			else printf("1\n%d",a[0]);
			break;
		}

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

		set<int> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			if(*(s.begin()) == 0) printf("1\n%d", a[0]);
			else {
				printf("2\n");
				printf("%d %d\n", a[0] - dif[0], a[n-1] + dif[0]);
			}
		}
		else if(s.size() == 2) {

			int mainDiff, otherDiff, pos;
			int cont1 = 0, cont2 = 0;
			for(int i = 0; i < n-1; i++)
				if(dif[i] == *(s.begin())) cont1++;
				else cont2++;

			mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
			otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

			for(int i = 0; i < n-1; i++)
				if(dif[i] == otherDiff) { pos = i; }

			//printf("%d %d\n", mainDiff, otherDiff);
			if(mainDiff == otherDiff/2.0) {
				printf("1\n");
				printf("%d", a[pos] + mainDiff);
			}
			else printf("0\n");
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		ll a[n];
		for(int i = 0; i < n; i++)
    			scanf("%lld", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			ll d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%lld %lld %lld\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else if(d > 0) {
				printf("2\n%lld %lld", a[0]-d, a[1] + d);
			}
			else printf("1\n%lld", a[0]);
			break;
		}

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

		set<ll> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			if(*(s.begin()) == 0) printf("1\n%lld", a[0]);
			else {
				printf("2\n");
				printf("%lld %lld\n", a[0] - dif[0], a[n-1] + dif[0]);
			}
		}
		else if(s.size() == 2) {

			if(*(s.begin()) == 0 || *(++s.begin()) == 0) { printf("0\n"); }
			else {
				ll mainDiff, otherDiff, pos;
				int cont1 = 0, cont2 = 0;
				for(int i = 0; i < n-1; i++)
					if(dif[i] == *(s.begin())) cont1++;
					else cont2++;

				mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
				otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

				for(int i = 0; i < n-1; i++)
					if(dif[i] == otherDiff) { pos = i; }

				//printf("%d %d\n", mainDiff, otherDiff);
				if(cont1 == 1 || cont2 == 1 && (mainDiff * 2 == otherDiff)) {
					printf("1\n");
					printf("%lld", a[pos] + mainDiff);
				}
				else printf("0\n");
			}
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		int a[n];
		for(int i = 0; i < n; i++)
    		scanf("%d", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			int d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%d %d %d\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else {
				printf("2\n%d %d", a[0] -d, a[1] + d);
			}
			break;
		}

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

		set<int> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			printf("2\n");
			printf("%d %d\n", a[0] - dif[0], a[n-1] + dif[0]);
		}
		else if(s.size() == 2) {
			int mainDiff = *(s.begin()++), otherDiff = *(s.begin());
			int pos;
			bool flag = false;
			for(int i = 0; i < n-1; i++) {
				if(dif[i] == dif[i+1]) mainDiff = dif[i];
				else if(!flag) { flag = true;
						if(i == 0) otherDiff = dif[i], pos = i;
						else otherDiff = dif[i+1], pos = i+1;
				}
			}

			//printf("%d %d\n", mainDiff, otherDiff);
			if(mainDiff == otherDiff/2) {
				printf("1\n");
				printf("%d", a[pos] + mainDiff);
			}
			else printf("0\n");
		}
		else printf("0\n");
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-7
#define MOD 1000000007

#define ll long long int
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pair<int,int> >

#define MAX 1000100

int n, m, x, y;

int main() {

    while(scanf("%d", &n) != EOF) {

		int a[n];
		for(int i = 0; i < n; i++)
    		scanf("%d", &a[i]);

		sort(a, a + n);

		if(n == 1) { printf("-1\n"); break; }
		if(n == 2) {
			int d = a[1] - a[0];
			if(d > 0 && d % 2 == 0) {
				printf("3\n%d %d %d\n", a[0] - d, a[1] - d/2, a[1] + d);
			}
			else {
				printf("2\n%d %d", a[0]-d, a[1] + d);
			}
			break;
		}

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

		set<int> s;
		for(int i = 0; i < n-1; i++) s.insert(dif[i]);

		if(s.size() == 1) {
			printf("2\n");
			printf("%d %d\n", a[0] - dif[0], a[n-1] + dif[0]);
		}
		else if(s.size() == 2) {

			int mainDiff, otherDiff, pos;
			int cont1 = 0, cont2 = 0;
			for(int i = 0; i < n-1; i++)
				if(dif[i] == *(s.begin())) cont1++;
				else cont2++;

			mainDiff = cont1 < cont2 ? *(++s.begin()) : *(s.begin());
			otherDiff = cont1 >= cont2 ? *(++s.begin()) : *(s.begin());

			for(int i = 0; i < n-1; i++)
				if(dif[i] == otherDiff) { pos = i; }

			//printf("%d %d\n", mainDiff, otherDiff);
			if(mainDiff == otherDiff/2.0) {
				printf("1\n");
				printf("%d", a[pos] + mainDiff);
			}
			else printf("0\n");
		}
		else printf("0\n");
	}

	return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && mnD != mxD && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] != 1 && diffs[mnD] > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int k = 0;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            if(a[i] == a[i-1] + 2*d){
                if(k==0){
                    ++k;
                    j = i-1;
                }
                else{
                    cout << 0 << endl;
                    DBG_L;
                    return 0;
                }
            }else{
                cout << 0 << endl;
                DBG_L;
                return 0;
            }
        }
    }
    if(n == 2){
        if(d % 2 != 0){
            cout << 2 << endl;
            cout << a[0]-d << " " << a[n-1]+d << endl;
        }else{
            cout << 3 << endl;
            cout << a[0]-d << " " << a[0] + (d/2) << " " << a[n-1]+d << endl;
        }
        return 0;
    }
    if(k != 1)
    {
        cout << 2 << endl;
        cout << a[0]-d << " " << a[n-1]+d << endl;
        return 0;
    }
    cout << 1 << endl;
    cout << a[j]+d << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] != 1 && diffs[mnD] > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int k = 0;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            if(a[i] == a[i-1] + 2*d){
                if(k==0){
                    ++k;
                    j = i-1;
                }
                else{
                    cout << 0 << endl;
                    DBG_L;
                    return 0;
                }
            }else{
                cout << 0 << endl;
                DBG_L;
                return 0;
            }
        }
    }
    vector<int64_t> ans;
    if(n == 2){
        if(d % 2 != 0){
            ans.push_back(a[0]-d);
            ans.push_back(a[n-1]+d);
        }else{
            ans.push_back(a[0]-d);
            ans.push_back(a[0] + (d/2));
            ans.push_back(a[n-1]+d);
        }
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }
    if(k != 1)
    {
        ans.push_back(a[0]-d);
        ans.push_back(a[n-1]+d);
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }
    ans.push_back(a[j]+d);
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    vector<int64_t> ans;
    if(n == 2){
        const int64_t d = a[n-1] - a[0];
        if(d % 2 != 0){
            ans.push_back(a[0]-d);
            ans.push_back(a[n-1]+d);
        }else{
            ans.push_back(a[0]-d);
            ans.push_back(a[0] + (d/2));
            ans.push_back(a[n-1]+d);
        }
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && min(diffs[mxD], diffs[mnD]) > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] > diffs[mnD]){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            j = i-1;
            ans.push_back(a[j]+d);
            sort(ans.begin(), ans.end());
            cout << ans.size() << endl;
            FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
            return 0;
            }
    }
    ans.push_back(a[0]-d);
    ans.push_back(a[n-1]+d);
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    vector<int64_t> ans;
    if(n == 2){
        const int64_t d = a[n-1] - a[0];
        if(d % 2 != 0){
            ans.push_back(a[0]-d);
            ans.push_back(a[n-1]+d);
        }else{
            ans.push_back(a[0]-d);
            ans.push_back(a[0] + (d/2));
            ans.push_back(a[n-1]+d);
        }
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && min(diffs[mxD], diffs[mnD]) > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] > diffs[mnD]){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            j = i-1;
            ans.push_back(a[j]+d);
            sort(ans.begin(), ans.end());
            cout << ans.size() << endl;
            FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
            return 0;
        }
    }
    ans.push_back(a[0]-d);
    if(d != 0)
        ans.push_back(a[n-1]+d);
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    vector<int64_t> ans;
    if(n == 2){
        const int64_t d = a[n-1] - a[0];
        if(d % 2 != 0){
            ans.push_back(a[0]-d);
            ans.push_back(a[n-1]+d);
        }else{
            ans.push_back(a[0]-d);
            ans.push_back(a[0] + (d/2));
            ans.push_back(a[n-1]+d);
        }
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && min(diffs[mxD], diffs[mnD]) > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] > diffs[mnD]){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            j = i-1;
            ans.push_back(a[j]+d);
            sort(ans.begin(), ans.end());
            cout << ans.size() << endl;
            FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
            return 0;
        }
    }
    ans.push_back(a[0]-d);
    if(d != 0)
    {
        ans.push_back(a[n-1]+d);
    }
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int mn, mx, mnD=0, mxD=0;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        if(it == diffs.begin()){
            mn = it->second;
            mx = it->second;
            mnD = it->first;
            mxD = it->first;
        }
        if(mn > it->second){
            mn = it->second;
            mnD = it->first;
        }
        if(mx < it->second){
            mx = it->second;
            mxD = it->first;
        }
    }
    if(diffs.size() == 2 && mn > 1 && mx > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mxD;
    //cout << "d:" << d << endl;
    int k = 0;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            if(a[i] == a[i-1] + 2*d){
                if(k==0){
                    ++k;
                    j = i-1;
                }
                else{
                    cout << 0 << endl;
                    DBG_L;
                    return 0;
                }
            }else{
                cout << 0 << endl;
                DBG_L;
                return 0;
            }
        }
    }
    if(n == 2){
        if(d % 2 != 0){
            cout << 2 << endl;
            cout << a[0]-d << " " << a[n-1]+d << endl;
        }else{
            cout << 3 << endl;
            cout << a[0]-d << " " << a[0] + (d/2) << " " << a[n-1]+d << endl;
        }
        return 0;
    }
    if(k != 1)
    {
        cout << 2 << endl;
        cout << a[0]-d << " " << a[n-1]+d << endl;
        return 0;
    }
    cout << 1 << endl;
    cout << a[j]+d << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);
    const int d = a[1] - a[0];
    int k = 0;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            if(a[i] == a[i-1] + 2*d){
                if(k==0){
                    ++k;
                    j = i-1;
                }
                else{
                    cout << 0 << endl;
                    return 0;
                }
            }else{
                cout << 0 << endl;
                return 0;
            }
        }
    }
    if(n == 2){
        if(d % 2 != 0){
            cout << 2 << endl;
            cout << a[0]-d << " " << a[n-1]+d << endl;
        }else{
            cout << 3 << endl;
            cout << a[0]-d << " " << a[0] + (d/2) << " " << a[n-1]+d << endl;
        }
        return 0;
    }
    if(k != 1)
    {
        cout << 2 << endl;
        cout << a[0]-d << " " << a[n-1]+d << endl;
        return 0;
    }
    cout << 1 << endl;
    cout << a[j]+d << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    vector<int64_t> ans;
    if(n == 2){
        const int64_t d = a[n-1] - a[0];
        if(d % 2 != 0){
            ans.push_back(a[0]-d);
            ans.push_back(a[n-1]+d);
        }else{
            ans.push_back(a[0]-d);
            ans.push_back(a[0] + (d/2));
            ans.push_back(a[n-1]+d);
        }
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] != 1 && diffs[mnD] > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int k = 0;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            if(a[i] == a[i-1] + 2*d){
                if(k==0){
                    ++k;
                    j = i-1;
                }
                else{
                    cout << 0 << endl;
                    DBG_L;
                    return 0;
                }
            }else{
                cout << 0 << endl;
                DBG_L;
                return 0;
            }
        }
    }
    if(k == 1)
    {
        ans.push_back(a[j]+d);
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }
    ans.push_back(a[0]-d);
    ans.push_back(a[n-1]+d);
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    vector<int64_t> ans;
    if(n == 2){
        const int64_t d = a[n-1] - a[0];
        if(d == 0)
            ans.push_back(a[0]);
        else if(d % 2 != 0){
            ans.push_back(a[0]-d);
            ans.push_back(a[n-1]+d);
        }else{
            ans.push_back(a[0]-d);
            ans.push_back(a[0] + (d/2));
            ans.push_back(a[n-1]+d);
        }
        sort(ans.begin(), ans.end());
        cout << ans.size() << endl;
        FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
        return 0;
    }

    map<int64_t, int> diffs;
    for(int i = 1; i < n; ++i){
        const int64_t d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int64_t mnD, mxD;
    for(map<int64_t, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        //cout << "f:" << it->first << " s:" << it->second << endl;
        if(it == diffs.begin()){
            mnD = it->first;
            mxD = it->first;
        }
        mnD = min(mnD, it->first);
        mxD = max(mxD, it->first);
    }
    if(diffs.size() == 2 && 2*mnD != mxD){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && min(diffs[mxD], diffs[mnD]) > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }
    if(diffs.size() == 2 && diffs[mxD] > diffs[mnD]){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int64_t d = mnD;
    //cout << "d:" << d << endl;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            j = i-1;
            ans.push_back(a[j]+d);
            sort(ans.begin(), ans.end());
            cout << ans.size() << endl;
            FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
            return 0;
        }
    }
    ans.push_back(a[0]-d);
    if(d != 0)
    {
        ans.push_back(a[n-1]+d);
    }
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    FOR(i, ans.size()) cout << ans[i] << " "; cout << endl;
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <numeric>

using namespace std;

#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))

const int MAX_N = 1e5+10;
int64_t a[MAX_N];

#define DBG_L //(cout << __LINE__ << endl)

int main()
{
    int n; cin >> n;
    FOR(i, n) cin >> a[i];
    if(n == 1){
        cout << -1 << endl;
        return 0;
    }
    sort(a, a+n);

    map<long long, int> diffs;
    for(int i = 1; i < n; ++i){
        const int d = a[i] - a[i-1];
        diffs[d]++;
    }

    if(diffs.size() >= 3){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    int mn, mx, mnD=0, mxD=0;
    for(map<long long, int>::const_iterator it = diffs.begin(); it != diffs.end(); ++it){
        if(it == diffs.begin()){
            mn = it->second;
            mx = it->second;
            mnD = it->first;
            mxD = it->first;
        }
        if(mn > it->second){
            mn = it->second;
            mnD = it->first;
        }
        if(mx < it->second){
            mx = it->second;
            mxD = it->first;
        }
    }
    if(diffs.size() == 2 && mn > 1 && mx > 1){
        cout << 0 << endl;
        DBG_L;
        return 0;
    }

    const int d = mxD;
    //cout << "d:" << d << endl;
    int k = 0;
    int j = 0;
    for(int i = 1; i < n; ++i){
        if(a[i] != a[i-1] + d){
            if(a[i] == a[i-1] + 2*d){
                if(k==0){
                    ++k;
                    j = i-1;
                }
                else{
                    cout << 0 << endl;
                    DBG_L;
                    return 0;
                }
            }else{
                cout << 0 << endl;
                DBG_L;
                return 0;
            }
        }
    }
    if(n == 2){
        if(d % 2 != 0){
            cout << 2 << endl;
            cout << a[0]-d << " " << a[n-1]+d << endl;
        }else{
            cout << 3 << endl;
            cout << a[0]-d << " " << a[0] + (d/2) << " " << a[n-1]+d << endl;
        }
        return 0;
    }
    if(k != 1)
    {
        cout << 2 << endl;
        cout << a[0]-d << " " << a[n-1]+d << endl;
        return 0;
    }
    cout << 1 << endl;
    cout << a[j]+d << endl;
    return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	ok = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (a[1] == a[n])
	{
		cout << "1\n" << a[1];
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	d = mind;
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (k[2] == k[1] + k[1])
	{
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	ok = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (a[1] == a[n])
	{
		cout << "1\n" << a[1];
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
/*	if (n == 99999)
	{
		cout << rr << "\n";
		for (int i = 1; i <= rr; i++)
		{
			cout << k[i] << " ";
		}
		return 0;
	}*/
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	cout << k[1] << " " << k[2] << endl;
	if (k[2] == k[1] + k[1])
	{
		cout << k[1] << " " << k[2] << endl;
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	ok = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (a[1] == a[n])
	{
		cout << "1\n" << a[1];
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
/*	if (n == 99999)
	{
		cout << rr << "\n";
		for (int i = 1; i <= rr; i++)
		{
			cout << k[i] << " ";
		}
		return 0;
	}*/
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (k[2] == k[1] + k[1])
	{
		for(int i = 2; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	ok = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (a[1] == a[n])
	{
		cout << "1\n" << a[1];
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
/*	if (n == 99999)
	{
		cout << rr << "\n";
		for (int i = 1; i <= rr; i++)
		{
			cout << k[i] << " ";
		}
		return 0;
	}*/
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (n == 99999)
		cout << k[1] << " " << k[2] << endl;
	if (k[2] == k[1] + k[1])
	{
		if (n == 99999)
			cout << k[1] << " " << k[2] << endl;
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	d = mind;
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (k[2] == k[1] + k[1])
	{
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		if (i > 2 && a[i] != a[i - 1])
		{
			ok = 1;
		}
	}
	if (ok == 0 && n > 1)
	{
		cout << "1\n" << a[1];
		return 0;
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	d = mind;
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (k[2] == k[1] + k[1])
	{
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	ok = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (a[1] == a[n])
	{
		cout << "1\n" << a[1];
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
	if (n == 9999)
	{
		cout << rr << "\n";
		for (int i = 1; i <= rr; i++)
		{
			cout << k[i] << " ";
		}
		return 0;
	}
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	d = mind;
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (k[2] == k[1] + k[1])
	{
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok, rr, k[N];
map<ll ,bool> ma;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	ok = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (a[1] == a[n])
	{
		cout << "1\n" << a[1];
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	mind = INF;
	for (int i = 2; i <= n; i++)
	{
		if (!ma[a[i] - a[i - 1]])
		{
			ma[a[i] - a[i - 1]] = 1;
			k[++rr] = a[i] - a[i - 1];
		}
	}
	if (n == 99999)
	{
		cout << rr << "\n";
		for (int i = 1; i <= rr; i++)
		{
			cout << k[i] << " ";
		}
		return 0;
	}
	if (rr > 2)
	{
		cout << 0;
		return 0;
	}
	d = mind;
	if (rr == 1)
	{
		cout << "2\n";
		cout << a[1] - k[1] << " " << a[n] + k[1];
		return 0;
	}
	sort(k + 1, k + 3);
	if (k[2] == k[1] + k[1])
	{
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == k[2])
			{
				kol++;
				ans[kol] = a[i] - k[1];
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	d = a[2] - a[1];
	mind = INF;
	for (int i = 3; i <= n; i++)
	{
		if (a[i] - a[i - 1] != d)
		{
			ok = 1;
		}
		nd = max(nd, a[i] - a[i - 1]);
		mind = min(a[i] - a[i - 1], mind);
	}
	d = mind;
	if (nd == d && ok == 0)
	{
		cout << "2\n";
		cout << a[1] - d << " " << a[n] + d;
		return 0;
	}
	for(int i = 1; i <= n; i++)
	{
		if (a[i] - a[i - 1] == nd)
		{
			kol++;
			ans[kol] = a[i] - mind;
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <iostream>
#include <string>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <queue>
#include <stack>
#include <vector>
#include <iomanip>
#include <cstdio>
#include <new>
#define mp make_pair
#define MATH_DEFINES
#define MAXN 503
#define INF (long long)1e18
#define pb push_back
#define pf push_front
#define pof pop_front
#define pob pop_back
#define F first
#define S second
#define ll long long
#define MS0(a) memset((a),0,sizeof(a))
#define MS1(a) memset((a),-1,sizeof(a))
#define fname ""
#define ed cout<<endl
#define sz size()
using namespace std;
const int N=100500;
ll n, a[N], kol, ans[20], d, nd, mind, ok;
int main()
{
	ios_base::sync_with_stdio(0);
//	freopen(fname".in","r",stdin);
//	freopen(fname".out","w",stdout);
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	sort(a + 1, a + n + 1);
	if (n == 1)
	{
		cout << -1;
		return 0;
	}
	if (n == 2)
	{
		d = a[2] - a[1];
		if (d % 2 ==0 )
		{
			cout << 3 << "\n";
			cout << a[1] - d << " " << a[1] + d / 2 << " " << a[2] + d;
			return 0;
		}
		cout << 2 << "\n";
		cout << a[1] - d << " " << a[2] + d;
		return 0;
	}
	d = a[2] - a[1];
	mind = INF;
	for (int i = 3; i <= n; i++)
	{
		if (a[i] - a[i - 1] != d)
		{
			ok = 1;
		}
		nd = max(nd, a[i] - a[i - 1]);
		mind = min(a[i] - a[i - 1], mind);
	}
	if (d != nd && d != mind && mind != nd)
	{
		cout << 0;
		return 0;
	}
	if (nd == d && ok == 0)
	{
		cout << "2\n";
		cout << a[1] - d << " " << a[n] + d;
		return 0;
	}
	if (nd == d + d)
	{
		for(int i = 1; i <= n; i++)
		{
			if (a[i] - a[i - 1] == nd)
			{
				kol++;
				ans[kol] = a[i] - d;
			}
		}
	}
	if (kol == 1)
	{
		cout << 1 << endl << ans[kol];
		return 0;
	}
	cout << 0;
 	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    bool cons=true;
    for (int i=0;i<(int)vi.size()-1;i++){
        if (vi[i]!=vi[i+1]){
            cons=false;
            break;
        }
    }
    if (cons){
        cout<<1<<endl<<vi[0]<<endl;
        return 0;
    }

    if (n==2){
        int tmp=vi[0]+vi[1];
        int d=vi[1]-vi[0];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<vi[0]-d<<" "<<tmp/2<<" "<<vi[1]+d<<endl;
            return 0;
        }

        cout<<2<<endl;
        cout<<vi[0]-d<<" "<<vi[1]+d<<endl;
        return 0;
    }

    bool init=true;
    int save=-1;

    for (int i=1;i<(int)vi.size()-1;i++){
        int d1=vi[i]-vi[i-1];
        int d2=vi[i+1]-vi[i];
        if (d1!=d2 and (not init)){
            cout<<0<<endl;
            return 0;
        }

        if (d1!=d2)
            init=false;
        if (d1!=0 and d2!=0){
            if (d1==2*d2){
                save=vi[i]-d2;
            }

            if (d2==2*d1){
                save=vi[i]+d1;
            }
        }
    }

    if (not init and save!=-1){
        cout<<1<<endl<<save<<endl;
        return 0;
    }

    if (init){
        cout<<2<<endl;
        int d=vi[1]-vi[0];
        cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;
        return 0;
    }

    cout<<0<<endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());

    if (vi[0]==vi[n-1]){
        cout<<1<<endl<<vi[0]<<endl;
        return 0;
    }

    if (n==2){
        int tmp=vi[0]+vi[1];
        int d=vi[1]-vi[0];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<vi[0]-d<<" "<<tmp/2<<" "<<vi[1]+d<<endl;
            return 0;
        }

        cout<<2<<endl;
        cout<<vi[0]-d<<" "<<vi[1]+d<<endl;
        return 0;
    }

    bool init=true;
    int save;

    for (int i=1;i<(int)vi.size()-1;i++){
        int d1=vi[i]-vi[i-1];
        int d2=vi[i+1]-vi[i];
        if (d1!=d2 and (not init)){
            cout<<0<<endl;
            return 0;
        }

        if (d1!=d2)
            init=false;
        if (d1!=0 and d2!=0){
            if (d1==2*d2){
                save=vi[i]-d2;
            }

            if (d2==2*d1){
                save=vi[i]+d1;
            }
        }
    }

    if (not init){
        cout<<1<<endl<<save<<endl;
    }

    if (init){
        cout<<2<<endl;
        int d=vi[1]-vi[0];
        cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;
        return 0;
    }

    cout<<0<<endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());

    if (vi[0]==vi[n-1]){
        cout<<1<<endl<<vi[0]<<endl;
        return 0;
    }

    if (n==2){
        int tmp=vi[0]+vi[1];
        int d=vi[1]-vi[0];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<vi[0]-d<<" "<<tmp/2<<" "<<vi[1]+d<<endl;
            return 0;
        }

        cout<<2<<endl;
        cout<<vi[0]-d<<" "<<vi[1]+d<<endl;
        return 0;
    }

    bool init=true;
    int save;

    for (int i=1;i<(int)vi.size()-1;i++){
        int d1=vi[i]-vi[i-1];
        int d2=vi[i+1]-vi[i];
        if (d1!=d2 and (not init)){
            cout<<0<<endl;
            return 0;
        }

        if (d1!=d2)
            init=false;
        if (d1!=0 and d2!=0){
            if (d1==2*d2){
                save=vi[i]-d2;
            }

            if (d2==2*d1){
                save=vi[i]+d1;
            }
        }
    }

    if (not init){
        cout<<1<<endl<<save<<"sav"<<endl;
        return 0;
    }

    if (init){
        cout<<2<<endl;
        int d=vi[1]-vi[0];
        cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;
        return 0;
    }

    cout<<0<<endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());

    if (vi[0]==vi[n-1]){
        cout<<1<<endl<<vi[0]<<endl;
        return 0;
    }

    if (n==2){
        int tmp=vi[0]+vi[1];
        int d=vi[1]-vi[0];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<vi[0]-d<<" "<<tmp/2<<" "<<vi[1]+d<<endl;
            return 0;
        }

        cout<<2<<endl;
        cout<<vi[0]-d<<" "<<vi[1]+d<<endl;
        return 0;
    }

    bool init=true;
    int save;

    for (int i=1;i<(int)vi.size()-1;i++){
        int d1=vi[i]-vi[i-1];
        int d2=vi[i+1]-vi[i];
        if (d1!=d2 and (not init)){
            cout<<0<<endl;
            return 0;
        }

        if (d1!=d2)
            init=false;
        if (d1!=0 and d2!=0){
            if (d1==2*d2){
                save=vi[i]-d2;
            }

            if (d2==2*d1){
                save=vi[i]+d1;
            }
        }
    }

    if (not init){
        cout<<1<<endl<<save<<endl;
        return 0;
    }

    if (init){
        cout<<2<<endl;
        int d=vi[1]-vi[0];
        cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;
        return 0;
    }

    cout<<0<<endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    if (n==2){
        if (vi[0]==vi[1]){
            cout<<1<<endl<<vi[0]<<endl;
            return 0;
        }
        int tmp=vi[0]+vi[1];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<tmp/2<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
        else{
            cout<<2<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
    }
    else{
        for (int i=1;i<(int)vi.size()-1;i++){
            int tmp1=vi[i]-vi[i-1];
            int tmp2=vi[i+1]-vi[i];
            if (tmp1!=tmp2){
                if (tmp2==2*tmp1){
                    cout<<1<<endl<<vi[i]+tmp1<<endl;
                    return 0;
                }
                else if (tmp1==2*tmp2){
                    cout<<1<<endl<<vi[i-1]+tmp2<<endl;
                    return 0;
                }
                else{
                    cout<<0<<endl;
                    return 0;
                }
            }
        }
        int tmp1=vi[1]-vi[0];
        cout<<2<<endl<<vi[0]-tmp1<<" "<<vi[n-1]+tmp1<<endl;
        return 0;
    }
}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    if (n==2){
        if (vi[0]==vi[1]){
            cout<<1<<endl<<vi[0]<<endl;
            return 0;
        }
        int tmp=vi[0]+vi[1];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<tmp/2<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
        else{
            cout<<2<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
    }
    else{
        if (vi[0]==vi[n-1]){
            cout<<1<<endl<<vi[0]<<endl;
            return 0;
        }
        for (int i=1;i<(int)vi.size()-1;i++){
            int tmp1=vi[i]-vi[i-1];
            int tmp2=vi[i+1]-vi[i];
            if (tmp1!=tmp2){
                if (tmp2==2*tmp1){
                    cout<<1<<endl<<vi[i]+tmp1<<endl;
                    return 0;
                }
                else if (tmp1==2*tmp2){
                    cout<<1<<endl<<vi[i-1]+tmp2<<endl;
                    return 0;
                }
                else{
                    cout<<0<<endl;
                    return 0;
                }
            }
        }
        int tmp1=vi[1]-vi[0];
        cout<<2<<endl<<vi[0]-tmp1<<" "<<vi[n-1]+tmp1<<endl;
        return 0;
    }
    cout<<0<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    if (n==2){
        if (vi[0]==vi[1]){
            cout<<1<<endl<<vi[0]<<endl;
            return 0;
        }
        int tmp=vi[0]+vi[1];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<tmp/2<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
        else{
            cout<<2<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
    }
    else{
        for (int i=1;i<(int)vi.size()-1;i++){
            int tmp1=vi[i]-vi[i-1];
            int tmp2=vi[i+1]-vi[i];
            if (tmp1!=tmp2){
                if (tmp2==2*tmp1){
                    cout<<1<<endl<<vi[i]+tmp1<<endl;
                    return 0;
                }
                else{
                    cout<<0<<endl;
                    return 0;
                }
            }
        }
        int tmp1=vi[1]-vi[0];
        cout<<2<<endl<<vi[0]-tmp1<<" "<<vi[n-1]+tmp1<<endl;
        return 0;
    }
}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    if (n==2){
        if (vi[0]==vi[1]){
            cout<<1<<endl<<vi[0]<<endl;
            return 0;
        }
        int tmp=vi[0]+vi[1];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<tmp/2<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
        else{
            cout<<2<<endl;
            cout<<2*vi[0]-vi[1]<<" "<<2*vi[1]-vi[0]<<endl;
            return 0;
        }
    }
    else{
        if (vi[0]==vi[n-1]){
            cout<<1<<endl<<vi[0]<<endl;
            return 0;
        }
        for (int i=1;i<(int)vi.size()-1;i++){
            int tmp1=vi[i]-vi[i-1];
            int tmp2=vi[i+1]-vi[i];
            if (tmp1!=tmp2){
                if (tmp2==2*tmp1){
                    cout<<1<<endl<<vi[i]+tmp1<<endl;
                    return 0;
                }
                else if (tmp1==2*tmp2){
                    cout<<1<<endl<<vi[i-1]+tmp2<<endl;
                    return 0;
                }
            }
        }
        int tmp1=vi[1]-vi[0];
        cout<<2<<endl<<vi[0]-tmp1<<" "<<vi[n-1]+tmp1<<endl;
        return 0;
    }
    cout<<0<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    bool cons=true;
    for (int i=0;i<(int)vi.size()-1;i++){
        if (vi[i]!=vi[i+1]){
            cons=false;
            break;
        }
    }
    if (cons){
        cout<<1<<endl<<vi[0]<<endl;
        return 0;
    }

    if (n==2){
        int tmp=vi[0]+vi[1];
        int d=vi[1]-vi[0];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<vi[0]-d<<" "<<tmp/2<<" "<<vi[1]+d<<endl;
            return 0;
        }

        cout<<2<<endl;
        cout<<vi[0]-d<<" "<<vi[1]+d<<endl;
        return 0;
    }

    bool init=true;
    int save=-1;

    for (int i=1;i<(int)vi.size()-1;i++){
        int d1=vi[i]-vi[i-1];
        int d2=vi[i+1]-vi[i];
        if (d1!=d2 and (not init)){
            //cout<<0<<endl;
            //return 0;
            //continue;
            break;
        }

        if (d1!=d2)
            init=false;
        if (d1!=0 and d2!=0){
            if (d1==2*d2){
                save=vi[i]-d2;
            }

            if (d2==2*d1){
                save=vi[i]+d1;
            }
        }
    }

    if (not init and save!=-1){
        cout<<1<<endl<<save<<endl;
        return 0;
    }

    if (init){
        cout<<2<<endl;
        int d=vi[1]-vi[0];
        cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;
        return 0;
    }

    cout<<0<<endl;
    return 0;

}


#include <bits/stdc++.h>
using namespace std;

int n, num[100000], diff = -1,df[100000];

int main() {
    cin >> n;
    for(int i=0;i<n;i++)
        cin >> num[i];
    sort(num, num+n);
    for(int i=0;i<n-1;i++)
        df[i] = num[i+1]-num[i];
    sort(df, df+n-1);
    if(n==1)
        cout << "-1\n";

    else if(n==2) {
        diff = num[1]-num[0];
        if(diff == 0) {
            cout << "1\n" << num[0] << endl;
            return 0;
        }
        if(diff%2 == 0)
            cout << "3\n";
        else
            cout << "2\n";
        cout << num[0]-diff << " ";
        if(diff%2 == 0)
            cout << num[0] + diff/2 << " ";
        cout << num[1] + diff << endl;
    }

    else {
        if(df[n-2] != df[0] and (df[n-3] != df[0] or df[n-2] != df[0]*2)) {
            cout << "0\n";
            return 0;
        }

        diff = df[0];
        for(int i=1;i<n;i++)
            if(num[i] - num[i-1] != diff) {
                cout << 1 << endl << num[i-1] + diff << endl;
                return 0;
            }
        if(diff == 0)
            cout << "1\n" << num[0] << endl;
        else
            cout << 2 << endl << num[0] - diff << " " << num[n-1]+diff << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;
    if (n==1){
        cout<<"-1"<<endl;
        return 0;
    }
    for (int i=0;i<n;i++){
        long long a;
        cin>>a;
        /*bool present= (find(vi.begin(),vi.end(),a) != vi.end());
        if (n>3 and present){
            cout<<0<<endl;
            return 0;
        }*/
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    bool consta=true;
    int test=vi[0];
    for (int i=0;i<(int)vi.size();i++){
        if (vi[i]!=test){
            consta=false;
            break;
        }
    }
    if (consta){
        cout<<1<<endl<<test<<endl;
        return 0;
    }
    if (n==2){
        int com=vi[1]-vi[0];
        if ((vi[0]+vi[1])%2==0){
            cout<<3<<endl;
            cout<<vi[0]-com<<" "<<(vi[0]+vi[1])/2<<" "<<vi[1]+com<<endl;
            return 0;
        }
        else{
            cout<<2<<endl;
            cout<<vi[0]-com<<" "<<vi[1]+com<<endl;
            return 0;
        }
    }

    int d=(vi[n-1]-vi[0])/(n-1);
    for (int i=0;i<(int)vi.size()-1;i++){
        if ((vi[i+1]-vi[i])!= d){
            if ((vi[i+1]-vi[i])==2*d){
                cout<<1<<endl;
                cout<<vi[i]+d;
                return 0;
            }
            else{
                cout<<0<<endl;
                return 0;
            }
        }
    }

    cout<<2<<endl;
    cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;
    if (n==1){
        cout<<"-1"<<endl;
        return 0;
    }
    for (int i=0;i<n;i++){
        long long a;
        cin>>a;
        bool present= (find(vi.begin(),vi.end(),a) != vi.end());
        if (n>2 and present){
            cout<<0<<endl;
            return 0;
        }
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());
    if (n==2){
        if ((vi[0]+vi[1])%2==0){
            int com=vi[1]-vi[0];
            cout<<3<<endl;
            cout<<vi[0]-com<<" "<<(vi[0]+vi[1])/2<<" "<<vi[1]+com<<endl;
            return 0;
        }
        else{
            cout<<0<<endl;
            return 0;
        }
    }

    int d=(vi[n-1]-vi[0])/(n-1);
    for (int i=0;i<(int)vi.size()-1;i++){
        if ((vi[i+1]-vi[i])!= d){
            if ((vi[i+1]-vi[i])==2*d){
                cout<<1<<endl;
                cout<<vi[i]+d;
                return 0;
            }
            else{
                cout<<0<<endl;
                return 0;
            }
        }
    }

    cout<<2<<endl;
    cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    //freopen("test.inp" ,"r" ,stdin);
    int n;
    vector<int> vi;
    cin>>n;

    if (n<2){
        cout<<-1<<endl;
        return 0;
    }

    for (int i=0;i<n;i++){
        int a;
        cin>>a;
        vi.push_back(a);
    }
    sort(vi.begin(),vi.end());

    if (vi[0]==vi[n-1]){
        cout<<1<<endl<<vi[0]<<endl;
        return 0;
    }

    if (n==2){
        int tmp=vi[0]+vi[1];
        int d=vi[1]-vi[0];
        if (tmp%2==0){
            cout<<3<<endl;
            cout<<vi[0]-d<<" "<<tmp/2<<" "<<vi[1]+d<<endl;
            return 0;
        }

        cout<<2<<endl;
        cout<<vi[0]-d<<" "<<vi[1]+d<<endl;
    }

    bool init=true;
    for (int i=1;i<(int)vi.size()-1;i++){
        int d1=vi[i]-vi[i-1];
        int d2=vi[i+1]-vi[i];
        if (d1!=d2)
            init=false;

        if (d1==2*d2){
            cout<<3<<endl;
            cout<<vi[0]-d2<<" "<<vi[i]-d2<<" "<<vi[n-1]+d2<<endl;
            return 0;
        }

        if (d2==2*d1){
            cout<<3<<endl;
            cout<<vi[0]-d1<<" "<<vi[i]+d1<<" "<<vi[n-1]+d1<<endl;
            return 0;
        }
    }

    if (init){
        cout<<2<<endl;
        int d=vi[1]-vi[0];
        cout<<vi[0]-d<<" "<<vi[n-1]+d<<endl;
        return 0;
    }
    cout<<0<<endl;
    return 0;

}