#include <iostream>
#include <vector>

using namespace std;

int main() {
    unsigned int n = 0, m = 0;
    vector<unsigned int> a;
    unsigned int num = 0;

    a.push_back(0);
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        cin >> num;
        a.push_back(num);
    }
    a.push_back(m);

    unsigned int w[100002];
    for (int i = 1; i < a.size(); i++) {
        w[i] = a[i] - a[i-1];
    }

    unsigned long long sum[100002];
    for (int i = 1; i <= n + 1; i += 2) {
        sum[0] += w[i];
        sum[1] += w[i+1];
    }

    if (a.size() >= 3) {
        sum[2] = w[1];
        for (int i = 4; i <= n + 1; i += 2) {
            sum[2] += w[i];
        }
    }

    for (int i = 3; i <= n + 1; i += 2) {
        sum[i] = sum[i-1] = sum[i-2] - w[i-1] + w[i-2];
    }

    /*
    for (int i = 0; i <= n + 1; i++) {
        cout << sum[i] << " ";
    }
    cout << endl;
    */

    unsigned long long max = sum[0];
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] - a[i-1] < 2) {
            continue;
        }

        if (i % 2 == 1) {
            unsigned long long tmp = sum[i] + a[i] - 1 - a[i-1];
            if (tmp > max) {
                max = tmp;
            }
        }
        else {
            unsigned long long tmp = sum[i] + a[i] - (a[i-1] + 1);
            if (tmp > max) {
                max = tmp;
            }
        }
    }

    cout << max << endl;

    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {
    unsigned int n = 0, m = 0;
    vector<unsigned int> a;
    unsigned int num = 0;

    a.push_back(0);
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        cin >> num;
        a.push_back(num);
    }
    a.push_back(m);

    unsigned int w[100002];
    for (int i = 1; i < a.size(); i++) {
        w[i] = a[i] - a[i-1];
    }

    unsigned long long sum[100002];
    for (int i = 1; i <= n + 1; i += 2) {
        sum[0] += w[i];
        sum[1] += w[i+1];
    }

    if (a.size() >= 3) {
        sum[2] = w[1];
        for (int i = 4; i <= n + 1; i += 2) {
            sum[2] += w[i];
        }
    }

    for (int i = 3; i <= n + 1; i++) {
        if (i % 2 == 1) {
            sum[i] = sum[i-2] - w[i-1] + w[i-2];
        }
        else {
            sum[i] = sum[i-2] -w[i] + w[i-1];
        }
    }

    /*
    for (int i = 0; i <= n + 1; i++) {
        cout << sum[i] << " ";
    }
    cout << endl;
    */

    unsigned long long max = sum[0];
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] - a[i-1] < 2) {
            continue;
        }

        if (i % 2 == 1) {
            unsigned long long tmp = sum[i] + a[i] - 1 - a[i-1];
            if (tmp > max) {
                max = tmp;
            }
        }
        else {
            unsigned long long tmp = sum[i] + a[i] - (a[i-1] + 1);
            if (tmp > max) {
                max = tmp;
            }
        }
    }

    cout << max << endl;

    return 0;
}


#include<bits/stdc++.h>
#define forn(i,n) for(int i=0;i<(n);++i)
#define ll long long
#define mset(a,n) memset(a,n,sizeof(a))
#define eps 1e-12
#define endl '\n'
using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	int n,m;
	cin >> n >> m;
	int a[100005],s[100005];
	mset(s,0);
	a[0] = 0;a[n+1] = m;
	for(int i = 1;i<=n;i++)
	{
		cin >> a[i];
		if(i%2){
			s[i+1] = s[i] = s[i-1] + a[i]-a[i-1];
		}
	}
	if(n%2==0){
		s[n+1] = s[n] + m-a[n];
	}
	int ans = s[n+1];
	for(int i = 1;i<=n;i++)
	{
		if(i%2)
		{
			if(a[i]-a[i-1]==1)continue;
			int temp = s[i] - 1;
			temp += m-a[i]-s[n+1]+s[i];
			ans = max(temp,ans);
		}
		else
		{
			if(a[i]-a[i-1]==1)continue;
			int temp = s[i-1] + a[i] - a[i-1] - 1;
			temp += m-a[i]-s[n+1]+s[i];
			ans = max(temp,ans);
		}
	}
	cout << ans << endl;
}


#include<bits/stdc++.h>
#define forn(i,n) for(int i=0;i<(n);++i)
#define ll long long
#define mset(a,n) memset(a,n,sizeof(a))
#define eps 1e-12
#define endl '\n'
using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	int n,m;
	cin >> n >> m;
	int a[100005],s[100005];
	mset(s,0);
	a[0] = 0;a[n+1] = m;
	for(int i = 1;i<=n;i++)
	{
		cin >> a[i];
		if(i%2){
			s[i+1] = s[i] = s[i-1] + a[i]-a[i-1];
		}
	}
	if(n%2==0){
		s[n+1] = s[n] + m-a[n];
	}
	int ans = s[n+1];
	for(int i = 1;i<=n+1;i++)
	{
		if(i%2)
		{
			if(a[i]-a[i-1]==1)continue;
			int temp = s[i] - 1;
			temp += m-a[i]-s[n+1]+s[i];
			ans = max(temp,ans);
		}
		else
		{
			if(a[i]-a[i-1]==1)continue;
			int temp = s[i-1] + a[i] - a[i-1] - 1;
			temp += m-a[i]-s[n+1]+s[i];
			ans = max(temp,ans);
		}
	}
	cout << ans << endl;
}


// 01.07.2018

/*

*/

# include <iostream>
# include <cstdio>
# include <cstring>
# include <string>
# include <cstdlib>
# include <cmath>
# include <iomanip>
# include <vector>
//                 insert, append, size
# include <stack>
//                 push, pop, top, empty
# include <queue>
//                 push, pop, front, empty
# include <map>
# include <list>
//                 push_back, begin, end
# include <algorithm>

# define iabs(x) ( (x) < 0 ? (-(x)) : (x) )
# define sqr(x) ( (x) * (x) )

//# define lint long long int
# define lint __int64

# define fi first
# define se second

# define x XX_
# define y YY_

using namespace std;

typedef pair <int, int> Pair;
typedef pair <int, Pair> trio;
typedef pair <Pair, lint> Trio;
typedef pair <Pair, Pair> Quattro;

const int N = 200200;
const int M = 256;
const int K = 26;
const int INF = 2000000000;
const double eps = 1e-12;

int k, m, n, a [N], on, off, pon, poff;
//char s [N];
bool ok;

int F ();

int main ()
{
# ifndef ONLINE_JUDGE
   freopen ("B.TXT", "r", stdin);
   freopen ("B.OUT", "w", stdout);
# endif

   ios_base::sync_with_stdio (false);
   cin.tie (NULL);

   cin >> n >> m;

   a [0] = 0, a [n+1] = m;
   for ( int i=1; i <= n; i++ )
   {
      cin >> a [i];
      if ( i % 2 == 1 )
         on += a [i] - a [i-1];
      else
         off += a [i] - a [i-1];
   }

   if ( n % 2 == 0 )
      on += m - a [n];
   else
      off += m - a [n];

   k = on;

# ifndef ONLINE_JUDGE
   cout << "*** n = " << n << endl;
   cout << "*** m = " << m << endl;
   cout << "*** ";
   for ( int i=0; i <= n+1; i++ )
      cout << a [i] << " (" << i << ")" << ( i % 2 == 0 ? "+" : "-" ) << " ";
   cout << endl;
   cout << "***  on = " << on << endl;
   cout << "*** off = " << off << endl;
   cout << endl;
   cout << "***   k = " << k << endl;
   cout << endl;
# endif

   for ( int i=0; i <= n; i++ )
   {
      if ( a [i+1] - a [i] >= 2 )
      {
         if ( i % 2 == 0 )
         {
            on -= a [i+1] - a [i];
            swap (on, off);
            if ( pon + on + a [i+1] - a [i] - 1 > k )
               k = pon + on + a [i+1] - a [i] - 1;
            swap (on, off);
            pon += a [i+1] - a [i];
         }
         else
         {
            off -= a [i+1] - a [i];
            swap (on, off);
            if ( pon + on + a [i+1] - a [i] - 1 > k )
               k = pon + on + a [i+1] - a [i] - 1;
            swap (on, off);
            poff += a [i+1] - a [i];
         }
      }
      else
      {
         if ( i % 2 == 0 )
            pon += a [i+1] - a [i];
         else
            poff += a [i+1] - a [i];
      }

# ifndef ONLINE_JUDGE
   cout << "*** " << i << " pon = " << pon << " poff = " << poff << endl;
   cout << "*** " << i << "  on = " <<  on << "  off = " <<  off << " k = " << k << endl;
# endif
   }

   cout << k;

//   system ("pause");
   return 0;
}

int F ()
{
   return 0;
}


// 01.07.2018
//
// ������������ ����� �� ����� 5

/*

*/

# include <iostream>
# include <cstdio>
# include <cstring>
# include <string>
# include <cstdlib>
# include <cmath>
# include <iomanip>
# include <vector>
//                 insert, append, size
# include <stack>
//                 push, pop, top, empty
# include <queue>
//                 push, pop, front, empty
# include <map>
# include <list>
//                 push_back, begin, end
# include <algorithm>

# define iabs(x) ( (x) < 0 ? (-(x)) : (x) )
# define sqr(x) ( (x) * (x) )

//# define lint long long int
# define lint __int64

# define fi first
# define se second

# define x XX_
# define y YY_

using namespace std;

typedef pair <int, int> Pair;
typedef pair <int, Pair> trio;
typedef pair <Pair, lint> Trio;
typedef pair <Pair, Pair> Quattro;

const int N = 200200;
const int M = 256;
const int K = 26;
const int INF = 2000000000;
const double eps = 1e-12;

int k, m, n, a [N], on, off, pon, poff;
//char s [N];
bool ok;

int F ();

int main ()
{
# ifndef ONLINE_JUDGE
   freopen ("B.TXT", "r", stdin);
   freopen ("B.OUT", "w", stdout);
# endif

   ios_base::sync_with_stdio (false);
   cin.tie (NULL);

   cin >> n >> m;

   a [0] = 0, a [n+1] = m;
   for ( int i=1; i <= n; i++ )
   {
      cin >> a [i];
      if ( i % 2 == 1 )
         on += a [i] - a [i-1];
      else
         off += a [i] - a [i-1];
   }

   if ( n % 2 == 0 )
      on += m - a [n];
   else
      off += m - a [n];

   k = on;

# ifndef ONLINE_JUDGE
   cout << "*** n = " << n << endl;
   cout << "*** m = " << m << endl;
   cout << "*** ";
   for ( int i=0; i <= n+1; i++ )
      cout << a [i] << " (" << i << ")" << ( i % 2 == 0 ? "+" : "-" ) << " ";
   cout << endl;
   cout << "***  on = " << on << endl;
   cout << "*** off = " << off << endl;
   cout << endl;
   cout << "***   k = " << k << endl;
   cout << endl;
# endif

   for ( int i=0; i <= n; i++ )
   {
      if ( a [i+1] - a [i] >= 2 )
      {
         if ( i % 2 == 0 )
         {
            on -= a [i+1] - a [i];
            swap (on, off);
            if ( pon + on + a [i+1] - a [i] - 1 > k )
               k = pon + on + a [i+1] - a [i] - 1;
            swap (on, off);
            pon += a [i+1] - a [i];
         }
         else
         {
            off -= a [i+1] - a [i];
            swap (on, off);
            if ( pon + on + a [i+1] - a [i] - 1 > k )
               k = pon + on + a [i+1] - a [i] - 1;
            swap (on, off);
            poff += a [i+1] - a [i];
         }
      }
      else
      {
         if ( i % 2 == 0 )
            pon += a [i+1] - a [i],
            on -= a [i+1] - a [i];
         else
            poff += a [i+1] - a [i],
            off -= a [i+1] - a [i];
      }

# ifndef ONLINE_JUDGE
   cout << "*** " << i << " pon = " << pon << " poff = " << poff << endl;
   cout << "*** " << i << "  on = " <<  on << "  off = " <<  off << " k = " << k << endl;
# endif
   }

   cout << k;

//   system ("pause");
   return 0;
}

int F ()
{
   return 0;
}


#include <iostream>

using namespace std;

typedef pair <int, int> ii;

int main()
{
    int n, m, a[100010];

    cin >> n >> m;

    a[0] = 0;
    a[n+1] = m;

    for (int i = 1; i <= n; i++)
        cin >> a[i];

    int on = 1;
    pair <ii, int> b[100010];

    for (int i = 1; i <= n+1; i++)
    {
        b[i].first = make_pair(a[i-1], a[i]);
        b[i].second = on;

        on = 1 - on;
    }

    int on_upto[100010], off_upto[100010];

    on_upto[0] = 0;
    off_upto[0] = 0;

    for (int i = 1; i <= n+1; i++)
    {
        // cout << b[i].first.first << " " << b[i].first.second << " " << b[i].second;

        if (b[i].second)
        {
            on_upto[i] = on_upto[i-1] + b[i].first.second - b[i].first.first;
            off_upto[i] = off_upto[i-1];
        }
        else
        {
            off_upto[i] = off_upto[i-1] + b[i].first.second - b[i].first.first;
            on_upto[i] = on_upto[i-1];
        }

        // cout << " " << on_upto[i] << " " << off_upto[i] << endl;
    }

    int ans = on_upto[n+1];

    for (int i = 1; i <= n+1; i++)
    {
        if (b[i].second)
        {
            // cout << on_upto[i-1] << " " << off_upto[n+1] - off_upto[i-1] + b[i].first.second - 1 - b[i].first.first << endl;
            ans = max(ans, on_upto[i-1] + off_upto[n+1] - off_upto[i-1] + b[i].first.second - 1 - b[i].first.first);
        }

        else
        {
            // cout << on_upto[i-1] << " " << off_upto[n+1] - off_upto[i] + 1 << endl;
            ans = max(ans, on_upto[i-1] + off_upto[n+1] - off_upto[i] + b[i].first.second - 1 - b[i].first.first);
        }
    }

    cout << ans << endl;

    return 0;
}


#include <iostream>

using namespace std;

typedef pair <int, int> ii;

int main()
{
    int n, m, a[100010];

    cin >> n >> m;

    a[0] = 0;
    a[n+1] = m;

    for (int i = 1; i <= n; i++)
        cin >> a[i];

    int on = 1;
    pair <ii, int> b[100010];

    for (int i = 1; i <= n+1; i++)
    {
        b[i].first = make_pair(a[i-1], a[i]);
        b[i].second = on;

        on = 1 - on;
    }

    int on_upto[100010], off_upto[100010];

    on_upto[0] = 0;
    off_upto[0] = 0;

    for (int i = 1; i <= n+1; i++)
    {
        // cout << b[i].first.first << " " << b[i].first.second << " " << b[i].second;

        if (b[i].second)
        {
            on_upto[i] = on_upto[i-1] + b[i].first.second - b[i].first.first;
            off_upto[i] = off_upto[i-1];
        }
        else
        {
            off_upto[i] = off_upto[i-1] + b[i].first.second - b[i].first.first;
            on_upto[i] = on_upto[i-1];
        }

        // cout << " " << on_upto[i] << " " << off_upto[i] << endl;
    }

    int ans = on_upto[n+1];

    for (int i = 1; i <= n+1; i++)
    {
        if (b[i].second)
        {
            // cout << on_upto[i-1] << " " << off_upto[n+1] - off_upto[i-1] + b[i].first.second - 1 - b[i].first.first << endl;
            ans = max(ans, on_upto[i-1] + off_upto[n+1] - off_upto[i-1] + b[i].first.second - 1 - b[i].first.first);
        }

        else
        {
            // cout << on_upto[i-1] << " " << off_upto[n+1] - off_upto[i] + 1 << endl;
            ans = max(ans, on_upto[i-1] + off_upto[n+1] - off_upto[i] + 1);
        }
    }

    cout << ans << endl;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main (){
	int item,n,m,i,j,pre=0,pre1,max=0,k;
	cin>>n>>m;
	for(i=1;i<=n;i++){
		cin>>item;
		pre1=item;
		item=item-pre;
		a[i]=item;
		pre=pre1;
	}
	a[i]=m-pre;
	for(i=1;i<=n+1;i++){
		if(i%2==1) max=max+a[i];
	}
	for(i=1;i<=n+1;i++){
		if(a[i]==1) continue;
		item=a[i]-1;
		k=i-1;
		while(k>0){
			if(k%2==1) item+=a[k];
			k--;
		}
		k=i+1;
		while(k<=n+1){
			if(k%2==0) item+=a[k];
			k++;
		}
		if(item>max) max=item;
	}
	cout<<max;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int a[100005],b[100005],c[100005];
int main (){
	int item,n,m,i,j,pre=0,pre1,max=0,k;
	cin>>n>>m;
	for(i=1;i<=n;i++){
		cin>>item;
		pre1=item;
		item=item-pre;
		a[i]=item;
		pre=pre1;
	}
	a[i]=m-pre;
	item=0;
	for(i=1;i<=n+1;i++){
		if(i%2==1){
			b[i]=item;
			item=item+a[i];
		}else{
			b[i]=item;
		}
	}
	item=0;
	for(i=n+1;i>0;i--){
		if(i%2==0){
			c[i]=item;
			item+=a[i];
		}else{
			c[i]=item;
		}
	}
	for(i=1;i<=n+1;i++){
		if(i%2==1) max=max+a[i];
	}
	for(i=1;i<=n+1;i++){
		if(a[i]==1) continue;
		item=a[i]-1;
		k=i;
		item+=b[k];
		k=i;
		item+=c[k];
		if(item>max) max=item;
	}
	cout<<max;

	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int sw[100010];
int n,m,cnt=0,dark=0,light=0;
struct Cha
{
	int sum,name;   //0为暗，1为明
}cha[100010];
bool cmp(struct Cha x,struct Cha y)
{
	if(x.sum>y.sum)  return 1;
	else return 0;
}
int main(){
	scanf("%d%d",&n,&m);
	sw[n+1]=m;
	sw[0]=0;
	int maxx=-1,maxp;
	for(int i=1;i<=n;i++)
	    scanf("%d",&sw[i]);
	for(int i=1;i<=n+1;i++)
	{
		cha[i].sum=sw[i]-sw[i-1];
		if(cha[i].sum>maxx)
		{
			maxx=cha[i].sum;
			maxp=i;
		}

		if(i%2==1)
		   cha[i].name=1;
		else
		   cha[i].name=0;
	}

	/*if(cha[maxp].name==0)
	{
	   for(int i=maxp+1;i<=n+1;i++)
	     	if(cha[i].name==0)  light+=cha[i].sum;
	   for(int i=0;i<maxp;i++)
	   	    if(cha[i].name==1)   light+=cha[i].sum;
	   light+=cha[maxp].sum-1;
	}
	else
	{
		for(int i=maxp+1;i<=n+1;i++)
		    if(cha[i].name==0)   light+=cha[i].sum;
		for(int)
	}*/
	for(int i=maxp+1;i<=n+1;i++)
	     	if(cha[i].name==0)  light+=cha[i].sum;
	   for(int i=0;i<maxp;i++)
	   	    if(cha[i].name==1)   light+=cha[i].sum;
	   light+=cha[maxp].sum-1;
	   printf("%d",light);
	return 0;
}


#include<cstdio>//CF1000B
#include<iostream>
#include<algorithm>
#include<set>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<cstdlib>
#include<cmath>

using namespace std;

int n,m,ANS,sm,N;

vector<int>a,c;

set<int>s;

int main(){
    int flag=0,re,u,v;
    scanf("%d%d",&n,&m);
    N=n+1;
    a.push_back(0);
    for(int i=1;i<=n;i++){
        scanf("%d",&re);
        a.push_back(re);
        s.insert(re);
    }
    if(n%2==0){
        a.push_back(m);
        N++;
        flag=1;
    }
    for(int i=0,j=i+1;i<N;i+=2,j=i+1){
        u=a[i];
        v=a[j];
        sm-=(u-v);
        c.push_back(sm);
        c.push_back(sm+1);
    }
    ANS=sm;
    for(int i=0;i<n;i++){
        if(s.count(a[i+1]+1)&&s.count(a[i+1]-1)){
            continue;
        }
        int now=c[i],ex=sm-now,et=m-a[i+1]-1;
        ANS=max(ANS,now+et-ex);
    }
    printf("%d\n",ANS);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int sw[100010];
int n,m,cnt=0,dark=0,light=0;
struct Cha
{
	int sum,name;   //0为暗，1为明
}cha[100010];
bool cmp(struct Cha x,struct Cha y)
{
	if(x.sum>y.sum)  return 1;
	else return 0;
}
int main(){
	scanf("%d%d",&n,&m);
	sw[n+1]=m;
	sw[0]=0;
	int maxx=-1,maxp;
	bool flag=false;
	for(int i=1;i<=n;i++)
	    scanf("%d",&sw[i]);
	for(int i=1;i<=n+1;i++)
	{
		cha[i].sum=sw[i]-sw[i-1];
		if(cha[i].sum>maxx)
		{
			maxx=cha[i].sum;
			maxp=i;
		}
		if(cha[i].sum==maxx)
		  flag=true;
		if(i%2==1)
		   cha[i].name=1;
		else
		   cha[i].name=0;
	}
    if(flag==false)
	{
	  for(int i=maxp+1;i<=n+1;i++)
	     	if(cha[i].name==0)  light+=cha[i].sum;
	   for(int i=0;i<maxp;i++)
	   	    if(cha[i].name==1)   light+=cha[i].sum;
	   light+=cha[maxp].sum-1;
}
else
{
	for(int i=1;i<=n+1;i++)
	{
		if(cha[i].name==1)  light+=cha[i].sum;
	}
}
	   printf("%d",light);
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int sw[100010];
int n,m,cnt=0,dark=0,light=0;
struct Cha
{
	int sum,name;   //0为暗，1为明
}cha[100010];
bool cmp(struct Cha x,struct Cha y)
{
	if(x.sum>y.sum)  return 1;
	else return 0;
}
int main(){
	scanf("%d%d",&n,&m);
	sw[n+1]=m;
	sw[0]=0;
	int maxx=-1,maxp;
	bool flag=false;
	for(int i=1;i<=n;i++)
	    scanf("%d",&sw[i]);
	for(int i=1;i<=n+1;i++)
	{
		cha[i].sum=sw[i]-sw[i-1];
		if(cha[i].sum>maxx)
		{
			maxx=cha[i].sum;
			maxp=i;
		}

		if(i%2==1)
		   cha[i].name=1;
		else
		   cha[i].name=0;

		if(cha[i].sum==maxx&&cha[i].name==cha[maxp].name&&i!=maxp)
		  {
		   flag=true;
		   //cout<<maxx<<endl;
	}
	}
    if(flag==false)
	{
	  for(int i=maxp+1;i<=n+1;i++)
	     	if(cha[i].name==0)  light+=cha[i].sum;
	   for(int i=0;i<maxp;i++)
	   	    if(cha[i].name==1)   light+=cha[i].sum;
	   light+=cha[maxp].sum-1;
}
else
{
	for(int i=1;i<=n+1;i++)
	{
		if(cha[i].name==1)  light+=cha[i].sum;
	}
}
	   printf("%d",light);
	   //cout<<flag<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i,s,e) for(int i = (s); i < (e); i++)

const int maxn=100009;

int num[maxn];
int di[maxn];
int main()
{
    int m,n;
    scanf("%d%d",&m,&n);
    num[0]=0;
    di[0]=0;
    int t;
    FOR(i,1,m+1)
    {
        scanf("%d",&num[i]);
        di[i]=num[i]-num[i-1];
    }
    num[m+1]=n;
    di[m+1]=num[m+1]-num[m];

    int flag=1;
    int ans=0,temp=0;

    for(int i=3;i<=m+1;i+=2)
    {
        di[i]+=di[i-2];
    }
    for(int i=2;i<=m+1;i+=2)
    {
        di[i]+=di[i-2];
    }

    for(int i=1;i<=m+1;i++)
    {
        temp=0;
        if(i%2==1)
        {

            if(i!=1)
            {
                temp+=di[i-2];
                temp+=di[i]-di[i-2]-1;
            }
            else
            {
                temp+=di[1]-1;
            }
            temp-=di[i-1];
            if((m+1)%2==1)
            {
                temp+=di[m];
            }
            else temp+=di[m+1];
        }
        else
        {
            temp+=di[i-1];
            temp+=di[i]-di[i-2]-1;
            temp-=di[i];
            if((m+1)%2==1)
            {
                temp+=di[m];
            }
            else{temp +=di[m+1];}
        }
        if (temp > ans)ans=temp;
     //   cout << temp <<endl;
    }

    if(di[m]>ans)ans=di[m];
    else if(di[m+1]>ans)ans=di[m+1];
    printf("%d\n",ans);
  //  for(int i=1;i<=m+1;i++)
  //      cout << di[i]<<endl;
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<string>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#define FAST ios::sync_with_stdio(false);
#define pb push_back
#define lowbit(x) x&(-x)
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int mod = (int)1e9 + 5;
const int maxn = (int)1e5 + 5;
using namespace std;

int a[maxn];

int main()
{
	int n, m; scanf("%d %d", &n, &m);
	a[0] = 0, a[n+1] = m;
	for(int i = 1; i <= n; i++){
		scanf("%d", a + i);
	}
	int ans = a[1];
	for(int i = 1; i <= n; i++){
		if(i % 2 == 0) ans += (a[i+1] - a[i]);
	}
	int sum;
	int flag;
	if(n & 1) sum = m - a[n], flag = 1;
	else sum = a[n] - m, flag = -1;
	int Max = max(0, sum);
	for(int i = n; i >= 1; i--){
		flag *= -1;
		sum += (a[i] - a[i-1]) * flag;
		Max = max(Max, sum);
	}
	Max = max(Max, 0);
	if(!Max) Max++;
	printf("%d\n", Max + ans - 1);
	return 0;
}


#include<bits/stdc++.h>
#include<cstdio>
#define N 100005
using namespace std;
inline long long read(){
	long long ans=0,w=1;
	char ch=getchar();
	while(!isdigit(ch)){
		if(ch=='-')w=-1;
		ch=getchar();
	}
	while(isdigit(ch))ans=(ans<<3)+(ans<<1)+ch-'0',ch=getchar();
	return ans*w;
}
long long n,m,a[N],b[N],s1[N][10],s2[N][10],ans=0;
int main(){
	cin>>n>>m;
	a[0]=0,a[n+1]=m;
	for(long long i=1;i<=n;++i)cin>>a[i];
	for(long long i=1;i<=n+1;++i){
		s1[i][0]=s1[i-1][1]+a[i]-a[i-1];
		s1[i][1]=s1[i-1][0];
	}
	for(long long i=n;i>=0;--i){
		s2[i][0]=s2[i+1][1]+a[i+1]-a[i];
		s2[i][1]=s2[i+1][0];
	}
	ans=s1[n+1][n%2];
	for(long long i=1;i<=n;++i)if(i&1)ans=max(ans,s1[i][0]+a[i+1]-a[i]-1+s2[i+1][1]);
	cout<<ans;
	return 0;
}


#include<bits/stdc++.h>
#include<cstdio>
#define N 100005
using namespace std;
inline long long read(){
	long long ans=0,w=1;
	char ch=getchar();
	while(!isdigit(ch)){
		if(ch=='-')w=-1;
		ch=getchar();
	}
	while(isdigit(ch))ans=(ans<<3)+(ans<<1)+ch-'0',ch=getchar();
	return ans*w;
}
long long n,m,a[N],b[N],s1[N][10],s2[N][10],ans=0;
int main(){
	n=read(),m=read();
	a[0]=0,a[n+1]=m;
	for(long long i=1;i<=n;++i)a[i]=read();
	for(long long i=1;i<=n+1;++i){
		s1[i][0]=s1[i-1][1]+a[i]-a[i-1];
		s1[i][1]=s1[i-1][0];
	}
	for(long long i=n;i>=0;--i){
		s2[i][0]=s2[i+1][1]+a[i+1]-a[i];
		s2[i][1]=s2[i+1][0];
	}
	ans=s1[n+1][n%2];
	for(long long i=1;i<=n;++i)ans=max(ans,s1[i][0]+a[i+1]-a[i]-1+s2[i+1][1]);
	printf("%lld",ans);
	return 0;
}


#include<bits/stdc++.h>
#include<cstdio>
#define N 100005
using namespace std;
inline long long read(){
	long long ans=0,w=1;
	char ch=getchar();
	while(!isdigit(ch)){
		if(ch=='-')w=-1;
		ch=getchar();
	}
	while(isdigit(ch))ans=(ans<<3)+(ans<<1)+ch-'0',ch=getchar();
	return ans*w;
}
long long n,m,a[N],b[N],s1[N][10],s2[N][10],ans=0;
int main(){
	cin>>n>>m;
	a[0]=0,a[n+1]=m;
	for(long long i=1;i<=n;++i)cin>>a[i];
	for(long long i=1;i<=n+1;++i){
		s1[i][0]=s1[i-1][1]+a[i]-a[i-1];
		s1[i][1]=s1[i-1][0];
	}
	for(long long i=n;i>=0;--i){
		s2[i][0]=s2[i+1][1]+a[i+1]-a[i];
		s2[i][1]=s2[i+1][0];
	}
	ans=s1[n+1][n%2];
	for(long long i=1;i<=n;++i)ans=max(ans,s1[i][0]+a[i+1]-a[i]-1+s2[i+1][1]);
	printf("%lld",ans);
	return 0;
}


#include<bits/stdc++.h>
int offl[200000];
int onl[200000];
int offr[200000];
int onr[200000];
int tie[200000],now=1;
int main (){
	int n,m,tmp;
	scanf("%d %d",&n,&m);
	for(int i=1;i<=n+1;++i){
		if(i==n+1)
			tie[i]=m;
		else
			scanf("%d",&tie[i]);
		if(now==1){
			onl[i]=onl[i-1]+tie[i]-tie[i-1];
			offl[i]=offl[i-1];
			now=0;
		}
		else{
			offl[i]=offl[i-1]+tie[i]-tie[i-1];
			onl[i]=onl[i-1];
			now=1;
		}
		if(i==n) tmp=now;
	}
	now=tmp;
	for(int i=n;i>=0;--i){
		if(now==1){
			onr[i]=onr[i+1]+abs(tie[i]-tie[i+1]);
			offr[i]=offr[i+1];
			now=0;
		}
		else{
			offr[i]=offr[i+1]+abs(tie[i]-tie[i+1]);
			onr[i]=onr[i+1];
			now=1;
		}
	}
	int ans=std::max(onl[n+1],offl[n+1]);
	now=1;
	for(int i=1;i<=n;++i){
		if(tie[i]-tie[i-1]==1&&tie[i+1]-tie[i]==1) continue;
		ans=std::max(ans,onl[i]-1+offr[i]);
	}
	printf("%d",ans);
}


#include<bits/stdc++.h>
int offl[200000];
int onl[200000];
int offr[200000];
int onr[200000];
int tie[200000],now=1;
int main (){
	int n,m;
	scanf("%d %d",&n,&m);
	for(int i=1;i<=n+1;++i){
		if(i==n+1)
			tie[i]=m;
		else
			scanf("%d",&tie[i]);
		if(now==1){
			onl[i]=onl[std::max(i-2,1)]+tie[i]-tie[i-1];
			offl[i]=offl[i-1];
			now=0;
		}
		else{
			offl[i]=offl[std::max(i-2,1)]+tie[i]-tie[i-1];
			onl[i]=onl[i-1];
			now=1;
		}
	}
	now=0;
	for(int i=n;i>=0;--i){
		if(now==1){
			onr[i]=onr[std::max(i+2,n+1)]+abs(tie[i]-tie[i+1]);
			offr[1+i]=offr[i+1];
			now=0;
		}
		else{
			offr[i]=offr[std::max(i+2,n+1)]+abs(tie[i]-tie[i+1]);
			onr[i]=onr[i+1];
			now=1;
		}
	}
	int ans=0;
	now=1;
	for(int i=0;i<=n+1;++i){
		if(now==1){
			ans=std::max(ans,onl[i]-1+offr[i]);
			now=0;
		}
		else{
			ans=std::max(ans,offl[i]-1+onr[i]);
			now=1;
		}
	}
	printf("%d",ans+1);
}


#include<bits/stdc++.h>
int offl[200000];
int onl[200000];
int offr[200000];
int onr[200000];
int tie[200000],now=1;
int main (){
	int n,m,tmp;
	scanf("%d %d",&n,&m);
	for(int i=1;i<=n+1;++i){
		if(i==n+1)
			tie[i]=m;
		else
			scanf("%d",&tie[i]);
		if(now==1){
			onl[i]=onl[std::max(i-1,1)]+tie[i]-tie[i-1];
			offl[i]=offl[i-1];
			now=0;
		}
		else{
			offl[i]=offl[std::max(i-1,1)]+tie[i]-tie[i-1];
			onl[i]=onl[i-1];
			now=1;
		}
		if(i==n) tmp=now;
	}
	now=tmp;
	for(int i=n;i>=0;--i){
		if(now==1){
			onr[i]=onr[std::min(i+1,n+1)]+abs(tie[i]-tie[i+1]);
			offr[i]=offr[i+1];
			now=0;
		}
		else{
			offr[i]=offr[std::min(i+1,n+1)]+abs(tie[i]-tie[i+1]);
			onr[i]=onr[i+1];
			now=1;
		}
	}
	int ans=onl[n+1];
	now=1;
	for(int i=1;i<=n;++i){
		if(tie[i]-tie[i-1]==1&&tie[i+1]-tie[i]==1) continue;
		if(now==1){
			ans=std::max(ans,onl[i]-1+offr[i]);
			now=0;
		}
		else{
			ans=std::max(ans,onl[i]-1+onr[i]);
			now=1;
		}
	}
	printf("%d",ans);
}


#include<cstdio>
#include<algorithm>
using namespace std;

int a[100010],b[100010];
int n,m,ans,f=1;

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		b[i]=b[i-1]+f*(a[i]-a[i-1]);
		f^=1;
	}
	b[n+1]=b[n]+f*(m-a[n]);
	ans=b[n+1];
	for (int i=1;i<=n;i++)
		ans=max(ans,2*b[i]+m-a[i]-b[n+1]-1);
	printf("%d\n",ans);
	return 0;
}


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

using namespace std;
typedef long long int lld;

int main(){
	int n;
	cin>>n;
	int m;
	cin>>m;
	int arr[n+2];
	for(int i=0;i<n;i++){
		cin>>arr[i+1];
	}arr[0]=0;
	arr[n+1]=m;
	n+=2;
	int DP1[n];
	int DP2[n];
	DP1[0]=0;
	for(int i=0;i<n-1;i++){
		DP1[i+1]=DP1[i]+(arr[i+1]-arr[i])*((i+1)%2);
	}
	for(int i=0;i<n;i++){
		DP2[i]=DP1[n-1]-DP1[i];
		DP2[i]=(arr[n-1]-arr[i])-DP2[i];
		//cout<<DP2[i]<<endl;
	}
	int ans=DP1[n-1];
	for(int i=0;i<n-1;i++){
		if(arr[i+1]-arr[i]>1){
			ans=max(ans,DP1[i]+DP2[i+1]+arr[i+1]-arr[i]-1);
		}
	}cout<<ans<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    vector <int> a(n), pref(n), pref_rv(n);
    for (int i = 0; i < n + 1; ++i) {
        if (i == n) {
            a[i] = m;
        } else {
            cin >> a[i];
            if (a[i] > m) {
                a[i] = m;
            }
        }
        if (i == 0) {
            pref[0] = a[i];
            pref_rv[0] = 0;
        } else if (i % 2 == 0) {
            pref[i] = pref[i - 1] + a[i] - a[i - 1];
            pref_rv[i] = pref_rv[i - 1];
        } else {
            pref[i] = pref[i - 1];
            pref_rv[i] = pref_rv[i - 1] + a[i] - a[i - 1];
        }

        if (a[i] == m) {
            n = i + 1;
            break;
        }
    }
    int ans = pref[n - 1];

    for (int i = 0; i < n; ++i) {
        if (i == 0) {
            ans = max(ans,
                pref_rv[n - 1] - pref_rv[i] + a[i] - 1
            );
        } else {
            ans = max(ans,
                pref[i - 1] + pref_rv[n - 1] - pref_rv[i] + a[i] - a[i - 1] - 1
            );
        }
    }
    cout << ans << endl;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    vector <int> a(n + 1), pref(n + 1), pref_rv(n + 1);
    for (int i = 0; i < n + 1; ++i) {
        if (i == n) {
            a[i] = m;
        } else {
            cin >> a[i];
            if (a[i] > m) {
                a[i] = m;
            }
        }
        if (i == 0) {
            pref[0] = a[i];
            pref_rv[0] = 0;
        } else if (i % 2 == 0) {
            pref[i] = pref[i - 1] + a[i] - a[i - 1];
            pref_rv[i] = pref_rv[i - 1];
        } else {
            pref[i] = pref[i - 1];
            pref_rv[i] = pref_rv[i - 1] + a[i] - a[i - 1];
        }

        if (a[i] == m) {
            n = i + 1;
            break;
        }
    }

    int ans = pref[n - 1];

    for (int i = 0; i < n; ++i) {
        if (i == 0) {
            ans = max(ans,
                pref_rv[n - 1] - pref_rv[i] + a[i] - 1
            );
        } else {
            ans = max(ans,
                pref[i - 1] + pref_rv[n - 1] - pref_rv[i] + a[i] - a[i - 1] - 1
            );
        }
    }
    cout << ans << endl;
}


#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>

using namespace std;
//for(int i=0; i<n; i++)
/*int Max(int a, int b)
{ if (a>b) return a;
  else return b;
}*/

int main()
{  int n,M;

   cin>>n>>M;

   int a[n+2], b[n+2][2]={0};

   a[0]=0;
   a[n+1]=M;
   for(int i=0; i<n; i++)
      cin>>a[i+1];
   bool svet=!(n%2);
   //cout<<svet<<endl;
   for(int i=n; i>=0; i--, svet=!svet)
    {  b[i][(int)svet]=b[i+1][(int)svet]+a[i+1]-a[i];
       b[i][(int)!svet]=b[i+1][(int)!svet];
       //cout<<b[i][0]<<" "<<b[i][1]<<" "<<svet<<endl;
    }
    svet=1;
    int light=0;
    int max=b[0][1];

    for(int i=1; i<=n; i++, svet=!svet)
    { if(svet)
        light+=a[i]-a[i-1];
      if(svet && a[i]-a[i-1]>2)
        if(light-1+b[i][0]>max)
          max=light-1+b[i][0];

      if(!svet && a[i]-a[i-1]>2)
        if(light+a[i]-a[i-1]-1+b[i][0]>max)
          max=light+a[i]-a[i-1]-1+b[i][0];
    }

   cout<<max;
}


#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>

using namespace std;
//for(int i=0; i<n; i++)
/*int Max(int a, int b)
{ if (a>b) return a;
  else return b;
}*/

int main()
{  int n,M;

   cin>>n>>M;

   int a[n+2], b[n+2][2]={0};

   a[0]=0;
   a[n+1]=M;
   for(int i=0; i<n; i++)
      cin>>a[i+1];
   bool svet=!(n%2);
   //cout<<svet<<endl;
   for(int i=n; i>=0; i--, svet=!svet)
    {  b[i][(int)svet]=b[i+1][(int)svet]+a[i+1]-a[i];
       b[i][(int)!svet]=b[i+1][(int)!svet];
      // cout<<b[i][0]<<" "<<b[i][1]<<" "<<svet<<endl;
    }
    svet=1;
    int light=0;
    int max=b[0][1];
    //cout<<endl;

    for(int i=1; i<=n+1; i++, svet=!svet)
    { if(svet)
        light+=a[i]-a[i-1];
      if(svet && a[i]-a[i-1]>1)
        if(light-1+b[i][0]>max)
          max=light-1+b[i][0];

      if(!svet && a[i]-a[i-1]>1)
        if(light+a[i]-a[i-1]-1+b[i][0]>max)
          max=light+a[i]-a[i-1]-1+b[i][0];

      //cout<<light<<" ";
    }
   //cout<<endl;
   cout<<max;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<cassert>
#include<set>
#include<time.h>
#include<queue>
#include<map>
#include<sstream>
#include <bits/stdc++.h>

using namespace std;

#define vi vector < int >
#define vll vector < ll >
#define pb push_back
#define ll long long int
#define llu unsigned long long
#define MOD 1000000007
#define F first
#define S second
#define INF 2000000000
#define dbg(x) { cout<< #x << ": " << (x) << endl; }
#define loop(i,a,b) for(int i = a; i<b;i++)
#define all(x) x.begin(),x.end()
#define MAX 1000007
#define mapsi map < string, int >
#define mapii map < int, int >

int p(pair < ll , ll >  a, pair < ll , ll > b){
    return ((a.F==b.F)?(a.S>b.S):(a.F<b.F));
}

int main(){
    ios_base::sync_with_stdio(0);

    ll n,m;cin>>n>>m;
    ll tots=0, a=0,b=0,c=0;
    vll arr(n),leftseon(n),rightseon(n),leftseoff(n),rightseoff(n);
    loop(i,0,n){
    	cin>>arr[i];
    }
    loop(i,0,n){
    	tots += (i%2==0)?((i==0)?arr[i]:(arr[i]-arr[i-1])):0;
    	leftseon[i] = tots;
    	a +=  (i%2==1)?(arr[i]-arr[i-1]):0;
    	leftseoff[i] = a;
    }
    if(n%2==0){
    	tots += m-arr[n-1];
    }
    for(int i = n-1;i>=0;i--){
    	b += (i%2==0)?((i==n-1)?(m-arr[i]):(arr[i+1]-arr[i])):0;
    	rightseoff[i]= b;
    	c += (i%2==1)?((i==n-1)?(m-arr[i]):(arr[i+1]-arr[i])):0;
    	rightseon[i]= c;
    }
/*
    loop(i,0,n) cout<<leftseon[i]<<" ";
    cout<<endl;
    loop(i,0,n) cout<<leftseoff[i]<<" ";
    cout<<endl;
    loop(i,0,n) cout<<rightseon[i]<<" ";
    cout<<endl;
    loop(i,0,n) cout<<rightseoff[i]<<" ";
    cout<<endl; */
    // base case
//    cout<<tots;
    ll temp= 0;
    loop(i,0,n){
    	temp =0;
    	if(i%2==0){
    		temp += (i==0)?0:leftseon[i-1];
    		ll inter = (i==0)?arr[i]:(arr[i]-arr[i-1]);
    		temp += inter-1;
    		temp+= rightseoff[i];
    	}
    	else{
    		temp += leftseon[i-1];
    		ll inter = (i==0)?arr[i]:(arr[i]-arr[i-1]);
    		temp += inter-1;
    		temp += rightseoff[i];
    	}
    	if(temp>tots){
    		tots=temp;
    	}
    }
    if(n%2==1){
    	temp=leftseon[n-1];
    	temp += m-arr[n-1]-1;
    }
    cout<<max(tots,temp);

    return 0;

}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<cassert>
#include<set>
#include<time.h>
#include<queue>
#include<map>
#include<sstream>
#include <bits/stdc++.h>

using namespace std;

#define vi vector < int >
#define vll vector < ll >
#define pb push_back
#define ll long long int
#define llu unsigned long long
#define MOD 1000000007
#define F first
#define S second
#define INF 2000000000
#define dbg(x) { cout<< #x << ": " << (x) << endl; }
#define loop(i,a,b) for(int i = a; i<b;i++)
#define all(x) x.begin(),x.end()
#define MAX 1000007
#define mapsi map < string, int >
#define mapii map < int, int >

int p(pair < ll , ll >  a, pair < ll , ll > b){
    return ((a.F==b.F)?(a.S>b.S):(a.F<b.F));
}

int main(){
    ios_base::sync_with_stdio(0);

    ll n,m;cin>>n>>m;
    ll tots=0, b=0;
    vll arr(n),leftseon(n),rightseoff(n);
    loop(i,0,n){
    	cin>>arr[i];
    }
    loop(i,0,n){
    	tots += (i%2==0)?((i==0)?arr[i]:(arr[i]-arr[i-1])):0;
    	leftseon[i] = tots;
    }
    if(n%2==0){
    	tots += m-arr[n-1];
    }
    for(int i = n-1;i>=0;i--){
    	b += (i%2==0)?((i==n-1)?(m-arr[i]):(arr[i+1]-arr[i])):0;
    	rightseoff[i]= b;
    }
/*
    loop(i,0,n) cout<<leftseon[i]<<" ";
    cout<<endl;
    loop(i,0,n) cout<<leftseoff[i]<<" ";
    cout<<endl;
    loop(i,0,n) cout<<rightseon[i]<<" ";
    cout<<endl;
    loop(i,0,n) cout<<rightseoff[i]<<" ";
    cout<<endl; */
    // base case
//    cout<<tots;
    ll temp= 0;
    loop(i,0,n){
    	temp =0;
    	if(i%2==0){
    		temp += (i==0)?0:leftseon[i-1];
    		ll inter = (i==0)?arr[i]:(arr[i]-arr[i-1]);
    		temp += inter-1;
    		temp+= rightseoff[i];
    	}
    	else{
    		temp += leftseon[i-1];
    		ll inter = (i==0)?arr[i]:(arr[i]-arr[i-1]);
    		temp += inter-1;
    		temp += rightseoff[i];
    	}
    	if(temp>tots){
    		tots=temp;
    	}
    }
    if(n%2==1){
    	temp=leftseon[n-1];
    	temp += m-arr[n-1]-1;
    }
    cout<<max(tots,temp);

    return 0;

}


#include <iostream>

using namespace std;

int n, m, a[100000], sum[100000];

bool status[100000];

main(){
    cin >> n >> m;
    for (int i = 1; i <= n; i++){
        cin >> a[i];
        status[i] = i % 2;
    }
    a[0] = 0;
    a[++n] = m;
    status[n] = 1 - status[n - 1];
    for (int i = n - 1; i >= 0; i--){
        if (!status[i]) sum[i] = sum[i + 1] + a[i + 1] - a[i];
        else sum[i] = sum[i + 1];
    }
    int mx = sum[0];
    //cout << mx;
    int s = 0;
    for (int i = 1; i <= n; i++){
        if (status[i]) s += a[i] - a[i - 1];
        if (status[i]) mx = max(mx, s - 1 + m - a[i] - sum[i]);
        else if (a[i] - a[i - 1] > 1) mx = max(mx, s + a[i] - a[i - 1] - 1 + m - a[i] - sum[i]);
    }
    cout << mx;
}


#include<bits/stdc++.h>
#define pi 2*acos(0.0)
using namespace std;
struct Point {double x,y;int id;Point(){}Point(double a,double b){x=a,y=b;}}p[1000];
typedef Point Vector;
const double eps=1e-10;
Vector operator+(Vector A,Vector B) {return Vector(A.x+B.x,A.y+B.y);}//向量+向量=向量，向量+点=点
Vector operator-(Vector A,Vector B) {return Vector(A.x-B.x,A.y-B.y);}//点-点=向量
Vector operator*(Vector A,double p) {return Vector(A.x*p,A.y*p);}//向量*数=向量
Vector operator/(Vector A,double p) {return Vector(A.x/p,A.y/p);}//向量/数=向量
bool operator<(const Point &a,const Point &b) {return a.x<b.x||(a.x==b.x&&a.y<b.y);}
int dcmp(double x){if(fabs(x)<eps) return 0;else return x<0?-1:1;}//判相等
bool operator==(const Point &a,const Point &b) {return dcmp(a.x-b.x)==0&&dcmp(a.y-b.y)==0;}
double Dot(Vector A,Vector B) {return A.x*B.x+A.y*B.y;}//点积 a.b=|a||b|cos
double Length(Vector A) {return sqrt(Dot(A,A));}//向量长度
double Angle(Vector A,Vector B) {return acos(Dot(A,B)/Length(A)/Length(B));}//夹角
double Cross(Vector A,Vector B) {return A.x*B.y-A.y*B.x;}//叉积axb=|a||b|sin
double Area2(Point A,Point B,Point C) {return Cross(B-A,C-A);}
Vector Rotate(Vector A,double rad){return Vector(A.x*cos(rad)-A.y*sin(rad),A.x*sin(rad)+A.y*cos(rad));}
//直线交点，点到直线距离，点到线段距离 ,点在直线上投影点,线段相交判定 ,点是否在线段上
struct Line
{
	Point p,v;
	double ang;
	friend bool operator<(Line x,Line y)
	{
		return fabs(x.ang-y.ang)<eps?Cross(x.v-x.p,y.v-x.p)>eps:x.ang-y.ang<eps;
	}
}a[1000],q[1000];
Point Jd(Line x,Line y)
{
	Point P=x.p,Q=y.p;
	Vector v=x.p-x.v,w=y.p-y.v;
	Vector u=P-Q;
	double t=Cross(w,u)/Cross(v,w);
	return P+v*t;
}
double Dtl(Point P,Point A,Point B) {Vector v1=B-A,v2=P-A;return fabs(Cross(v1,v2))/Length(v1);}
double Dts(Point P,Point A,Point B) {
	if(A==B)return Length(P-A);Vector v1=B-A,v2=P-A,v3=P-B;if(dcmp(Dot(v1,v2)<0)) return Length(v2);
	else if(dcmp(Dot(v1,v3))>0) return Length(v3);else return fabs(Cross(v1,v2))/Length(v1);}
Point Gjp(Point P,Point A,Point B) {Vector v=B-A;return A+v*(Dot(v,P-A))/(Dot(v,v));}
bool Spi(Point a1,Point a2,Point b1,Point b2){
	double c1=Cross(a2-a1,b1-a1),c2=Cross(a2-a1,b2-a1),c3=Cross(b2-b1,a1-b1),c4=Cross(b2-b1,a2-a1);
	return dcmp(c1)*dcmp(c2)<0&&dcmp(c3)*dcmp(c4)<0;}
bool Onseg(Point p,Point a1,Point a2){return dcmp(Cross(a1-p,a2-p))==0&&dcmp(Dot(a1-p,a2-p))<0;}
//多边形有向面积,点在多边形内判定
double Parea(Point *p,int n) {
	double area=0;p[n+1]=p[1];for(int i=1;i<=n;i++) area+=Cross(p[i],p[i+1]);return area/2.0;}
//直线和圆的交点
bool cmp(Point a,Point b)
{
	if(fabs(a.x-b.x)>eps) return a.x+eps<b.x;
	else return a.y+eps<b.y;
}
bool cmp1(Point a,Point b)//逆时针排序
{
	double tmp=Cross(b-p[0],a-p[0]);
	return tmp>0||(tmp==0&&Length(a)<Length(b));
}
struct Circle{
	Point o;double r;
	Circle(){}
	Circle(Point _o,double _r){o=_o,r=_r;}
	friend vector<Point> operator &(const Circle &c1,const Circle &c2)//圆交点
	{
		double d=Length(c1.o-c2.o);
		if(d>c1.r+c2.r+eps||d<fabs(c1.r-c2.r)-eps) return vector<Point>();
		double dt=(c1.r*c1.r-c2.r*c2.r)/d,d1=(d+dt)/2.0;
		Point dir=(c2.o-c1.o)/d,pcrs=c1.o+dir*d1;
		dt=sqrt(max(0.0,c1.r*c1.r-d1*d1));swap(dir.x,dir.y),dir.x=-dir.x;
		return vector<Point> {pcrs+dir*dt,pcrs-dir*dt};
	}
};
bool pd(Line i,Line j,Line k)
{
	Point P=Jd(i,j);
	return Cross(k.v-k.p,P-k.p)<eps;
}
int ConvexHull(Point *p,Point *st,int n)//求凸包
{
	sort(p,p+n,cmp);int m=0;
	for(int i=0;i<n;i++) {while(m>1&&Cross(st[m-1]-st[m-2],p[i]-st[m-2])<=0) --m;st[m++]=p[i];}
	int k=m;
	for(int i=n-2;i>=0;i--) {while(m>k&&Cross(st[m-1]-st[m-2],p[i]-st[m-2])<=0) --m;st[m++]=p[i];}
	if(n>1) --m;return m;
}
int Half_Plane(Line *a,int la,Point *b)//半平面交
{
	sort(a+1,a+1+la);
	int cnt=0;
	for(int i=1;i<=la;i++)
	{
		if(fabs(a[i].ang-a[i-1].ang)>eps) cnt++;
		a[cnt]=a[i];
	}
	int head=1,tail=0;
	q[++tail]=a[1],q[++tail]=a[2];
	for(int i=3;i<=cnt;i++)
	{
		while(head<tail&&pd(q[tail-1],q[tail],a[i])) tail--;
		while(head<tail&&pd(q[head+1],q[head],a[i])) head++;
		q[++tail]=a[i];
	}
	while(head<tail&&pd(q[tail-1],q[tail],q[head])) tail--;
	while(head<tail&&pd(q[head+1],q[head],q[tail])) head++;
	q[tail+1]=q[head];cnt=0;
	for(int i=head;i<=tail;i++) b[++cnt]=Jd(q[i],q[i+1]);
	return cnt;
}
int n;
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++) {cin>>p[i].x>>p[i].y;p[i].id=i;}
	p[0]=Point(0,0);
	sort(p+1,p+1+n,cmp1);
	double ans=2.0*pi;
	pair<int,int> res;
	for(int i=1;i<=n;i++)
	{
		//cout<<p[i].x<<" "<<p[i].y<<endl;
		int j=i%n+1;
		double tmp=Angle(p[i],p[j]);
		if(ans>tmp) ans=tmp,res=make_pair(p[i].id,p[j].id);
	}
	if(res.first>res.second) swap(res.first,res.second);
	cout<<res.first<<" "<<res.second<<endl;
}


#include<bits/stdc++.h>
#define pi 2*acos(0.0)
#define double long double
using namespace std;
struct Point {double x,y;int id;Point(){}Point(double a,double b){x=a,y=b;}}p[1000];
typedef Point Vector;
const double eps=1e-10;
Vector operator+(Vector A,Vector B) {return Vector(A.x+B.x,A.y+B.y);}//向量+向量=向量，向量+点=点
Vector operator-(Vector A,Vector B) {return Vector(A.x-B.x,A.y-B.y);}//点-点=向量
Vector operator*(Vector A,double p) {return Vector(A.x*p,A.y*p);}//向量*数=向量
Vector operator/(Vector A,double p) {return Vector(A.x/p,A.y/p);}//向量/数=向量
bool operator<(const Point &a,const Point &b) {return a.x<b.x||(a.x==b.x&&a.y<b.y);}
int dcmp(double x){if(fabs(x)<eps) return 0;else return x<0?-1:1;}//判相等
bool operator==(const Point &a,const Point &b) {return dcmp(a.x-b.x)==0&&dcmp(a.y-b.y)==0;}
double Dot(Vector A,Vector B) {return A.x*B.x+A.y*B.y;}//点积 a.b=|a||b|cos
double Length(Vector A) {return sqrt(Dot(A,A));}//向量长度
double Angle(Vector A,Vector B) {return acos(Dot(A,B)/Length(A)/Length(B));}//夹角
double Cross(Vector A,Vector B) {return A.x*B.y-A.y*B.x;}//叉积axb=|a||b|sin
double Area2(Point A,Point B,Point C) {return Cross(B-A,C-A);}
Vector Rotate(Vector A,double rad){return Vector(A.x*cos(rad)-A.y*sin(rad),A.x*sin(rad)+A.y*cos(rad));}
//直线交点，点到直线距离，点到线段距离 ,点在直线上投影点,线段相交判定 ,点是否在线段上
struct Line
{
	Point p,v;
	double ang;
	friend bool operator<(Line x,Line y)
	{
		return fabs(x.ang-y.ang)<eps?Cross(x.v-x.p,y.v-x.p)>eps:x.ang-y.ang<eps;
	}
}a[1000],q[1000];
Point Jd(Line x,Line y)
{
	Point P=x.p,Q=y.p;
	Vector v=x.p-x.v,w=y.p-y.v;
	Vector u=P-Q;
	double t=Cross(w,u)/Cross(v,w);
	return P+v*t;
}
double Dtl(Point P,Point A,Point B) {Vector v1=B-A,v2=P-A;return fabs(Cross(v1,v2))/Length(v1);}
double Dts(Point P,Point A,Point B) {
	if(A==B)return Length(P-A);Vector v1=B-A,v2=P-A,v3=P-B;if(dcmp(Dot(v1,v2)<0)) return Length(v2);
	else if(dcmp(Dot(v1,v3))>0) return Length(v3);else return fabs(Cross(v1,v2))/Length(v1);}
Point Gjp(Point P,Point A,Point B) {Vector v=B-A;return A+v*(Dot(v,P-A))/(Dot(v,v));}
bool Spi(Point a1,Point a2,Point b1,Point b2){
	double c1=Cross(a2-a1,b1-a1),c2=Cross(a2-a1,b2-a1),c3=Cross(b2-b1,a1-b1),c4=Cross(b2-b1,a2-a1);
	return dcmp(c1)*dcmp(c2)<0&&dcmp(c3)*dcmp(c4)<0;}
bool Onseg(Point p,Point a1,Point a2){return dcmp(Cross(a1-p,a2-p))==0&&dcmp(Dot(a1-p,a2-p))<0;}
//多边形有向面积,点在多边形内判定
double Parea(Point *p,int n) {
	double area=0;p[n+1]=p[1];for(int i=1;i<=n;i++) area+=Cross(p[i],p[i+1]);return area/2.0;}
//直线和圆的交点
bool cmp(Point a,Point b)
{
	if(fabs(a.x-b.x)>eps) return a.x+eps<b.x;
	else return a.y+eps<b.y;
}
bool cmp1(Point a,Point b)//逆时针排序
{
	double tmp=Cross(b-p[0],a-p[0]);
	return tmp>0||(tmp==0&&Length(a)<Length(b));
}
/*struct Circle{
	Point o;double r;
	Circle(){}
	Circle(Point _o,double _r){o=_o,r=_r;}
	friend vector<Point> operator &(const Circle &c1,const Circle &c2)//圆交点
	{
		double d=Length(c1.o-c2.o);
		if(d>c1.r+c2.r+eps||d<fabs(c1.r-c2.r)-eps) return vector<Point>();
		double dt=(c1.r*c1.r-c2.r*c2.r)/d,d1=(d+dt)/2.0;
		Point dir=(c2.o-c1.o)/d,pcrs=c1.o+dir*d1;
		dt=sqrt(max(0.0,c1.r*c1.r-d1*d1));swap(dir.x,dir.y),dir.x=-dir.x;
		return vector<Point> {pcrs+dir*dt,pcrs-dir*dt};
	}
};*/
bool pd(Line i,Line j,Line k)
{
	Point P=Jd(i,j);
	return Cross(k.v-k.p,P-k.p)<eps;
}
int ConvexHull(Point *p,Point *st,int n)//求凸包
{
	sort(p,p+n,cmp);int m=0;
	for(int i=0;i<n;i++) {while(m>1&&Cross(st[m-1]-st[m-2],p[i]-st[m-2])<=0) --m;st[m++]=p[i];}
	int k=m;
	for(int i=n-2;i>=0;i--) {while(m>k&&Cross(st[m-1]-st[m-2],p[i]-st[m-2])<=0) --m;st[m++]=p[i];}
	if(n>1) --m;return m;
}
int Half_Plane(Line *a,int la,Point *b)//半平面交
{
	sort(a+1,a+1+la);
	int cnt=0;
	for(int i=1;i<=la;i++)
	{
		if(fabs(a[i].ang-a[i-1].ang)>eps) cnt++;
		a[cnt]=a[i];
	}
	int head=1,tail=0;
	q[++tail]=a[1],q[++tail]=a[2];
	for(int i=3;i<=cnt;i++)
	{
		while(head<tail&&pd(q[tail-1],q[tail],a[i])) tail--;
		while(head<tail&&pd(q[head+1],q[head],a[i])) head++;
		q[++tail]=a[i];
	}
	while(head<tail&&pd(q[tail-1],q[tail],q[head])) tail--;
	while(head<tail&&pd(q[head+1],q[head],q[tail])) head++;
	q[tail+1]=q[head];cnt=0;
	for(int i=head;i<=tail;i++) b[++cnt]=Jd(q[i],q[i+1]);
	return cnt;
}
int n;
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++) {cin>>p[i].x>>p[i].y;p[i].id=i;}
	p[0]=Point(0,0);
	sort(p+1,p+1+n,cmp1);
	double ans=2.0*pi;
	pair<int,int> res;
	for(int i=1;i<=n;i++)
	{
		//cout<<p[i].x<<" "<<p[i].y<<endl;
		int j=i%n+1;
		double tmp=Angle(p[i],p[j]);
		if(ans>tmp) ans=tmp,res=make_pair(p[i].id,p[j].id);
	}
	if(res.first>res.second) swap(res.first,res.second);
	cout<<res.first<<" "<<res.second<<endl;
}


#include<bits/stdc++.h>
#define pi 2*acos(0.0)
#define double long double
using namespace std;
struct Point {double x,y;int id;Point(){}Point(double a,double b){x=a,y=b;}}p[150000];
typedef Point Vector;
const double eps=1e-10;
Vector operator+(Vector A,Vector B) {return Vector(A.x+B.x,A.y+B.y);}//向量+向量=向量，向量+点=点
Vector operator-(Vector A,Vector B) {return Vector(A.x-B.x,A.y-B.y);}//点-点=向量
Vector operator*(Vector A,double p) {return Vector(A.x*p,A.y*p);}//向量*数=向量
Vector operator/(Vector A,double p) {return Vector(A.x/p,A.y/p);}//向量/数=向量
bool operator<(const Point &a,const Point &b) {return a.x<b.x||(a.x==b.x&&a.y<b.y);}
int dcmp(double x){if(fabs(x)<eps) return 0;else return x<0?-1:1;}//判相等
bool operator==(const Point &a,const Point &b) {return dcmp(a.x-b.x)==0&&dcmp(a.y-b.y)==0;}
double Dot(Vector A,Vector B) {return A.x*B.x+A.y*B.y;}//点积 a.b=|a||b|cos
double Length(Vector A) {return sqrt(Dot(A,A));}//向量长度
double Angle(Vector A,Vector B) {return acos(Dot(A,B)/Length(A)/Length(B));}//夹角
double Cross(Vector A,Vector B) {return A.x*B.y-A.y*B.x;}//叉积axb=|a||b|sin
double Area2(Point A,Point B,Point C) {return Cross(B-A,C-A);}
Vector Rotate(Vector A,double rad){return Vector(A.x*cos(rad)-A.y*sin(rad),A.x*sin(rad)+A.y*cos(rad));}
//直线交点，点到直线距离，点到线段距离 ,点在直线上投影点,线段相交判定 ,点是否在线段上
struct Line
{
	Point p,v;
	double ang;
	friend bool operator<(Line x,Line y)
	{
		return fabs(x.ang-y.ang)<eps?Cross(x.v-x.p,y.v-x.p)>eps:x.ang-y.ang<eps;
	}
}a[1000],q[1000];
Point Jd(Line x,Line y)
{
	Point P=x.p,Q=y.p;
	Vector v=x.p-x.v,w=y.p-y.v;
	Vector u=P-Q;
	double t=Cross(w,u)/Cross(v,w);
	return P+v*t;
}
double Dtl(Point P,Point A,Point B) {Vector v1=B-A,v2=P-A;return fabs(Cross(v1,v2))/Length(v1);}
double Dts(Point P,Point A,Point B) {
	if(A==B)return Length(P-A);Vector v1=B-A,v2=P-A,v3=P-B;if(dcmp(Dot(v1,v2)<0)) return Length(v2);
	else if(dcmp(Dot(v1,v3))>0) return Length(v3);else return fabs(Cross(v1,v2))/Length(v1);}
Point Gjp(Point P,Point A,Point B) {Vector v=B-A;return A+v*(Dot(v,P-A))/(Dot(v,v));}
bool Spi(Point a1,Point a2,Point b1,Point b2){
	double c1=Cross(a2-a1,b1-a1),c2=Cross(a2-a1,b2-a1),c3=Cross(b2-b1,a1-b1),c4=Cross(b2-b1,a2-a1);
	return dcmp(c1)*dcmp(c2)<0&&dcmp(c3)*dcmp(c4)<0;}
bool Onseg(Point p,Point a1,Point a2){return dcmp(Cross(a1-p,a2-p))==0&&dcmp(Dot(a1-p,a2-p))<0;}
//多边形有向面积,点在多边形内判定
double Parea(Point *p,int n) {
	double area=0;p[n+1]=p[1];for(int i=1;i<=n;i++) area+=Cross(p[i],p[i+1]);return area/2.0;}
//直线和圆的交点
bool cmp(Point a,Point b)
{
	if(fabs(a.x-b.x)>eps) return a.x+eps<b.x;
	else return a.y+eps<b.y;
}
bool cmp1(Point a,Point b)//逆时针排序
{
	double tmp=Cross(b-p[0],a-p[0]);
	return tmp>0||(tmp==0&&Length(a)<Length(b));
}
/*struct Circle{
	Point o;double r;
	Circle(){}
	Circle(Point _o,double _r){o=_o,r=_r;}
	friend vector<Point> operator &(const Circle &c1,const Circle &c2)//圆交点
	{
		double d=Length(c1.o-c2.o);
		if(d>c1.r+c2.r+eps||d<fabs(c1.r-c2.r)-eps) return vector<Point>();
		double dt=(c1.r*c1.r-c2.r*c2.r)/d,d1=(d+dt)/2.0;
		Point dir=(c2.o-c1.o)/d,pcrs=c1.o+dir*d1;
		dt=sqrt(max(0.0,c1.r*c1.r-d1*d1));swap(dir.x,dir.y),dir.x=-dir.x;
		return vector<Point> {pcrs+dir*dt,pcrs-dir*dt};
	}
};*/
bool pd(Line i,Line j,Line k)
{
	Point P=Jd(i,j);
	return Cross(k.v-k.p,P-k.p)<eps;
}
int ConvexHull(Point *p,Point *st,int n)//求凸包
{
	sort(p,p+n,cmp);int m=0;
	for(int i=0;i<n;i++) {while(m>1&&Cross(st[m-1]-st[m-2],p[i]-st[m-2])<=0) --m;st[m++]=p[i];}
	int k=m;
	for(int i=n-2;i>=0;i--) {while(m>k&&Cross(st[m-1]-st[m-2],p[i]-st[m-2])<=0) --m;st[m++]=p[i];}
	if(n>1) --m;return m;
}
int Half_Plane(Line *a,int la,Point *b)//半平面交
{
	sort(a+1,a+1+la);
	int cnt=0;
	for(int i=1;i<=la;i++)
	{
		if(fabs(a[i].ang-a[i-1].ang)>eps) cnt++;
		a[cnt]=a[i];
	}
	int head=1,tail=0;
	q[++tail]=a[1],q[++tail]=a[2];
	for(int i=3;i<=cnt;i++)
	{
		while(head<tail&&pd(q[tail-1],q[tail],a[i])) tail--;
		while(head<tail&&pd(q[head+1],q[head],a[i])) head++;
		q[++tail]=a[i];
	}
	while(head<tail&&pd(q[tail-1],q[tail],q[head])) tail--;
	while(head<tail&&pd(q[head+1],q[head],q[tail])) head++;
	q[tail+1]=q[head];cnt=0;
	for(int i=head;i<=tail;i++) b[++cnt]=Jd(q[i],q[i+1]);
	return cnt;
}
int n;
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++) {cin>>p[i].x>>p[i].y;p[i].id=i;}
	p[0]=Point(0,0);
	random_shuffle(p+1,p+1+n);
	sort(p+1,p+1+n,cmp1);
	double ans=2.0*pi;
	pair<int,int> res;
	for(int i=1;i<=n;i++)
	{
		//cout<<p[i].x<<" "<<p[i].y<<endl;
		int j=i%n+1;
		double tmp=Angle(p[i],p[j]);
		if(ans>tmp) ans=tmp,res=make_pair(p[i].id,p[j].id);
	}
	if(res.first>res.second) swap(res.first,res.second);
	cout<<res.first<<" "<<res.second<<endl;
}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< long long int, long long int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>
# define PI          3.141592653589793238462643383279502884L

using namespace std;

bool func(par a, par b){
   int prodvect = a.st*b.nd - a.nd*b.st;
   if(prodvect < 0) return false;
   else return true;
}

long double dif(par a,par b){
long double difS = atan2l(b.nd,b.st) - atan2l(a.nd,a.st);
if(difS<0) difS=difS+PI+PI;
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
long long int n,x,y;
long double mindif=INF,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func);
sort(q2.begin(),q2.end(),func);
sort(q3.begin(),q3.end(),func);
sort(q4.begin(),q4.end(),func);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
sorted.push_back(sorted[0]);
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif < mindif){
        mindif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}

for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< int, int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (a.st*b.st + a.nd * b.nd)/sqrt((a.st*a.st+a.nd*a.nd)*(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< int, int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (a.st*b.st + a.nd * b.nd)/(sqrt(a.st*a.st+a.nd*a.nd)*sqrt(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< long long int, long long int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (a.st*b.st + a.nd * b.nd)/sqrt((a.st*a.st+a.nd*a.nd)*(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
long long int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
sorted.push_back(q1[0]);
for(int i = 0;i< sorted.size();i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< long long int, long long int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    long double sen1,sen2;
    sen1 = (a.nd)/sqrtl(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrtl(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    long double sen1,sen2;
    sen1 = (a.nd)/sqrtl(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrtl(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

long double dif(par a,par b){
long double difS = (a.st*b.st + a.nd * b.nd)/sqrtl((a.st*a.st+a.nd*a.nd)*(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
long long int n,x,y;
long double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
//sorted.push_back(q1[0]);
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
curdif = dif(sorted[0],sorted[sorted.size()-1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[0];
        v2=sorted[sorted.size()-1];
    }

for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< int, int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (a.st*b.st + a.nd * b.nd)/sqrt(a.st*a.st+a.nd*a.nd)*sqrt(b.st*b.st+b.nd*b.nd);
return difS;
}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< long long int, long long int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (double)(a.st*b.st + a.nd * b.nd)/sqrt((a.st*a.st+a.nd*a.nd)*(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
long long int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
sorted.push_back(q1[0]);
for(int i = 0;i< sorted.size();i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< long long int, long long int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (a.st*b.st + a.nd * b.nd)/sqrt((a.st*a.st+a.nd*a.nd)*(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
long long int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include<bits/stdc++.h>

#define INF 0x3f3f3f3f
#define par pair< long long int, long long int>
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
#define sti pair<string,int>

using namespace std;

bool func14(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1<sen2) return true;
    else return false;
}

bool func23(par a, par b){
    double sen1,sen2;
    sen1 = (a.nd)/sqrt(a.st*a.st+a.nd*a.nd);
    sen2 = (b.nd)/sqrt(b.st*b.st+b.nd*b.nd);
    if(sen1>sen2) return true;
    else return false;
}

double dif(par a,par b){
double difS = (a.st*b.st + a.nd * b.nd)/sqrt((a.st*a.st+a.nd*a.nd)*(b.st*b.st+b.nd*b.nd));
return difS;

}

int main(){
ios_base::sync_with_stdio(0), cin.tie(0);
vector<par> q1,q2,q3,q4,sorted,unf;
par v1,v2;
long long int n,x,y;
double maxdif=-1.1,curdif;
cin >> n;
for(int i=0;i<n;i++){
    cin >> x >> y;
    unf.push_back(mp(x,y));
    if(x>=0 && y>=0){
        q1.push_back(mp(x,y));
    }else if(x<0 && y>=0){
        q2.push_back(mp(x,y));
    } else if(x<0 && y<0){
        q3.push_back(mp(x,y));
    }else{
        q4.push_back(mp(x,y));
    }
}
sort(q1.begin(),q1.end(),func14);
sort(q2.begin(),q2.end(),func23);
sort(q3.begin(),q3.end(),func23);
sort(q4.begin(),q4.end(),func14);
for(int i = 0;i< q1.size();i++){
    sorted.push_back(q1[i]);
}
for(int i = 0;i< q2.size();i++){
    sorted.push_back(q2[i]);
}
for(int i = 0;i< q3.size();i++){
    sorted.push_back(q3[i]);
}
for(int i = 0;i< q4.size();i++){
    sorted.push_back(q4[i]);
}
//sorted.push_back(q1[0]);
for(int i = 0;i< sorted.size()-1;i++){
    curdif = dif(sorted[i],sorted[i+1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[i];
        v2=sorted[i+1];
    }
}
curdif = dif(sorted[0],sorted[sorted.size()-1]);
    if(curdif > maxdif){
        maxdif=curdif;
        v1=sorted[0];
        v2=sorted[sorted.size()-1];
    }

for(int i = 0;i< unf.size();i++){
    if(unf[i]==v1){
        cout << i+1 << " ";
    }
    if(unf[i]==v2){
        cout << i+1 << " ";
    }
}

}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	double x, y, minangle = 600;
	int n, s, e;
	cin >> n;
	vector<pair<double, int>>v;
	for (int i = 1; i <= n; i++)
	{
	cin >> x >> y;
	v.push_back({ atan2(x,y),i });
	while (v.back().first < 0)
		v.back().first += 2*pi;
	while (v.back().first >= 2*pi)
		v.back().first -= 2*pi;
	}
	sort(v.begin(), v.end());
	for (int i = 0; i < v.size(); i++)
	{
		if (min(abs(v[i].first - v[(i + 1) % n].first), 2*pi - abs(v[i].first - v[(i + 1) % n].first)) - minangle <= -1e-20)
		{
			minangle = min(abs(v[i].first - v[(i + 1)%n].first), 2*pi - abs(v[i].first - v[(i + 1)%n].first));
			s = v[i].second;
			e = v[(i + 1)%n].second;
		}
	}
	cout << s << ' ' << e;
	return 0;
}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	double x, y, minangle = 600;
	int n, s, e;
	cin >> n;
	vector<pair<double, int>>v;
	for (int i = 1; i <= n; i++)
	{
	cin >> x >> y;
	v.push_back({ atan2(x,y)*180.0/pi,i });
	while (v.back().first < 0)
		v.back().first += 360.0;
	while (v.back().first > 360.0)
		v.back().first -= 360.0;
	}
	sort(v.begin(), v.end());
	for (int i = 0; i < v.size(); i++)
	{
		if (min(abs(v[i].first - v[(i + 1)%n].first), 360.0 - abs(v[i].first - v[(i + 1)%n].first)) <= minangle)
		{
			minangle = min(abs(v[i].first - v[(i + 1)%n].first), 360.0 - abs(v[i].first - v[(i + 1)%n].first));
			s = v[i].second;
			e = v[(i + 1)%n].second;
		}
	}
	cout << s << ' ' << e;
	return 0;
}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
struct st
{
	int v1, v2;
}ans;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int x, y, n ,minang=400;
	cin >> n;
	vector<pair<double, int>> v;

	for(int i=1;i<=n;i++)
	{
		cin >> x >> y;
		point a = point(x, y);
	  double angle= arg(a);

	  v.push_back({ angle, i });
	}
	sort(v.begin(), v.end());
	for (int i = 1; i < v.size(); i++)
	{
		if (v[i].first - v[i - 1].first < minang)
		{
			ans.v1 = v[i].second;
			ans.v2 = v[i-1].second;
			minang = v[i].first - v[i - 1].first;
		}
	}
	cout << ans.v1 << ' ' << ans.v2;
	return 0;
}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
struct st
{
	int v1, v2;
}ans;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int x, y, n ,minang=400;
	cin >> n;
	vector<pair<double, int>> v;

	for(int i=1;i<=n;i++)
	{
		cin >> x >> y;
		point a = point(x, y);
	  double angle= arg(a)*180.0/pi;
	  while (angle < 0)
		  angle += 360;
	  v.push_back({ angle, i });
	}
	sort(v.begin(), v.end());
	for (int i = 1; i < v.size(); i++)
	{
		if (v[i].first - v[i - 1].first < minang)
		{
			ans.v1 = v[i].second;
			ans.v2 = v[i-1].second;
			minang = v[i].first - v[i - 1].first;
		}
	}
	cout << ans.v1 << '\n' << ans.v2;
	return 0;
}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	long double x, y, minangle = 600;
	int n, s, e;
	cin >> n;
	vector<pair<long double, int>>v;
	for (int i = 1; i <= n; i++)
	{
		cin >> x >> y;
		v.push_back({ atan2(x,y) * 180.0 / pi,i });
		while (v.back().first < 0)
			v.back().first += 360.0;
		while (v.back().first > 360.0)
			v.back().first -= 360.0;
	}
	sort(v.begin(), v.end());
	for (int i = 0; i < v.size(); i++)
	{
		if (min(abs(v[i].first - v[(i + 1) % n].first), 360.0 - abs(v[i].first - v[(i + 1) % n].first)) - minangle <= -1e-20)
		{
			minangle = min(abs(v[i].first - v[(i + 1) % n].first), 360.0 - abs(v[i].first - v[(i + 1) % n].first));
			s = v[i].second;
			e = v[(i + 1) % n].second;
		}
	}
	cout << s << ' ' << e;
	return 0;
}


	#include <iostream>
	#include <cstring>
	#include<complex>
	#include <algorithm>
	#include<iomanip>
	#include<map>
	#include<vector>
	using namespace std;
	#define point complex<double>
	#define pi 3.14159265359
	double dot(point a, point b)
	{
		return (conj(a) * b).real();
	}
	double cross(point a, point b)
	{
		return (conj(a) * b).imag();
	}
	struct st
	{
		int v1, v2;
	}ans;
	int main()
	{
		ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
		int x, y, n ,minang=181;
		cin >> n;
		vector<pair<long double, int>> v;

		for(int i=1;i<=n;i++)
		{
			cin >> x >> y;
		 long double angle= atan2(x,y)*180.0/pi;
		  while (angle < 0)
			  angle += 360;
		  v.push_back({ angle, i });
		}
		sort(v.begin(), v.end());
		for (int i = 1; i < v.size(); i++)
		{
			if (v[i].first - v[i - 1].first < minang )
			{
				ans.v1 = v[i].second;
				ans.v2 = v[i-1].second;
				minang = v[i].first - v[i - 1].first;
			}
		}
		cout << ans.v1 << '\n' << ans.v2;
		return 0;
	}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	double x, y, minangle = 600;
	int n, s, e;
	cin >> n;
	vector<pair<double, int>>v;
	for (int i = 1; i <= n; i++)
	{
	cin >> x >> y;
	v.push_back({ atan2(x,y)*180.0/pi,i });
	while (v.back().first < 0)
		v.back().first += 360.0;
	while (v.back().first > 360.0)
		v.back().first -= 360.0;
	}
	sort(v.begin(), v.end());
	for (int i = 0; i < v.size(); i++)
	{
		if (min(abs(v[i].first - v[(i + 1)%n].first), 360.0 - abs(v[i].first - v[(i + 1)%n].first)) < minangle)
		{
			minangle = min(abs(v[i].first - v[(i + 1)%n].first), 360.0 - abs(v[i].first - v[(i + 1)%n].first));
			s = v[i].second;
			e = v[(i + 1)%n].second;
		}
	}
	cout << s << ' ' << e;
	return 0;
}


#include <iostream>
#include <cstring>
#include<complex>
#include <algorithm>
#include<iomanip>
#include<map>
#include<vector>
using namespace std;
#define point complex<double>
#define pi 3.14159265359
double dot(point a, point b)
{
	return (conj(a) * b).real();
}
double cross(point a, point b)
{
	return (conj(a) * b).imag();
}
struct st
{
	int v1, v2;
}ans;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int x, y, n ,minang=181;
	cin >> n;
	vector<pair<long double, int>> v;

	for(int i=1;i<=n;i++)
	{
		cin >> x >> y;
		point a = point(x, y);
	 long double angle= arg(a)*180.0/pi;
	  while (angle < 0)
		  angle += 360;
	  v.push_back({ angle, i });
	}
	sort(v.begin(), v.end());
	for (int i = 1; i < v.size(); i++)
	{
		if (v[i].first - v[i - 1].first < minang )
		{
			ans.v1 = v[i].second;
			ans.v2 = v[i-1].second;
			minang = v[i].first - v[i - 1].first;
		}
	}
	cout << ans.v1 << '\n' << ans.v2;
	return 0;
}


	#include<bits/stdc++.h>

	using namespace std;

	int main() {

		// freopen("input.txt", "r", stdin);
		// freopen("output.txt", "w", stdout);

		int n;
		cin >> n;
		double x, y;
		vector<tuple<double, double, double, int>> vectors(n + 1);
		for (int i = 1; i <= n; ++i) {
			cin >> x >> y;
			vectors[i] = {atan2(y, x), x, y, i};
		}
		sort(vectors.begin() + 1, vectors.end());
		// for (int i = 1; i <= n; ++i) {
		// 	cout << get<0>(vectors[i]) << ' ' << get<1>(vectors[i]) << ' ' << get<2>(vectors[i]) << '\n';
		// }
		double minimal = 99999;
		pair<int, int> ans;
		for (int i = 1; i <= n; ++i) {
			// cout << i << (i) % (n) + 1 << '\n';
			double x1x2 = get<1>(vectors[i]) * get<1>(vectors[i % n + 1]);
			double y1y2 = get<2>(vectors[i]) * get<2>(vectors[i % n + 1]);
			double dot_product = x1x2 + y1y2;
			double mag_a = sqrt(pow(get<1>(vectors[i]), 2) + pow(get<2>(vectors[i]), 2));
			double mag_b = sqrt(pow(get<1>(vectors[i % n + 1]), 2) + pow(get<2>(vectors[i % n + 1]), 2));
			double angle = acos(dot_product / (mag_a * mag_b));
			if (angle < minimal) {
				// cout << angle << '\n';
				ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
				minimal = angle;
			}
		}
		cout << ans.first << ' ' << ans.second << '\n';
		return 0;
	}


	#include<bits/stdc++.h>

	using namespace std;

	int main() {

		// freopen("input.txt", "r", stdin);
		// freopen("output.txt", "w", stdout);

		int n;
		cin >> n;
		long double x, y;
		vector<tuple<long double, long double, long double, int>> vectors(n + 1);
		for (int i = 1; i <= n; ++i) {
			cin >> x >> y;
			vectors[i] = {atan2(y, x), x, y, i};
		}
		sort(vectors.begin() + 1, vectors.end());
		long double minimal = 1e100;
		pair<int, int> ans;
		for (int i = 1; i <= n; ++i) {
			long double x1x2 = get<1>(vectors[i]) * get<1>(vectors[i % n + 1]);
			long double y1y2 = get<2>(vectors[i]) * get<2>(vectors[i % n + 1]);
			long double dot_product = x1x2 + y1y2;
			long double determinant = x1x2 - y1y2;
			long double angle = atan2(determinant, dot_product);
			if (angle < minimal) {
				ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
				minimal = angle;
			}
		}
		cout << ans.first << ' ' << ans.second << '\n';
		return 0;
	}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double x1 = get<1>(vectors[i]);
		long double y1 = get<2>(vectors[i]);
		long double x2 = get<1>(vectors[i + 1]);
		long double y2 = get<2>(vectors[i + 1]);
		long double dot_product = x1 * x2 + y1 * y2;
		long double determinant = x1 * y2 - x2 * y1;
		long double angle = atan2(determinant, dot_product);
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double angle1 = get<1>(vectors[i]);
		long double angle2 = get<1>(vectors[i % n + 1]);
		long double angle = labs(angle2 - angle1);
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	double x, y;
	vector<tuple<double, double, double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan(y / x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	// for (int i = 1; i <= n; ++i) {
	// 	cout << get<0>(vectors[i]) << ' ' << get<1>(vectors[i]) << ' ' << get<2>(vectors[i]) << '\n';
	// }
	double minimal = 99999;
	pair<int, int> ans;
	for (int i = 1; i < n; ++i) {
		double x1x2 = get<1>(vectors[i]) * get<1>(vectors[i + 1]);
		double y1y2 = get<2>(vectors[i]) * get<2>(vectors[i + 1]);
		double dot_product = x1x2 + y1y2;
		double mag_a = sqrt(pow(get<1>(vectors[i]), 2) + pow(get<2>(vectors[i]), 2));
		double mag_b = sqrt(pow(get<1>(vectors[i + 1]), 2) + pow(get<2>(vectors[i + 1]), 2));
		double angle = acos(dot_product / (mag_a * mag_b));
		if (angle < minimal) {
			// cout << angle << '\n';
			ans = {get<3>(vectors[i]), get<3>(vectors[i + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


	#include<bits/stdc++.h>

	using namespace std;

	const long double PI = acos(-1.0);

	int main() {

		// freopen("input.txt", "r", stdin);
		// freopen("output.txt", "w", stdout);

		int n;
		cin >> n;
		long double x, y;
		vector<tuple<long double, long double, long double, int>> vectors(n + 1);
		for (int i = 1; i <= n; ++i) {
			cin >> x >> y;
			vectors[i] = {atan2(y, x), x, y, i};
		}
		sort(vectors.begin() + 1, vectors.end());
		long double minimal = 1e100;
		pair<int, int> ans;
		for (int i = 1; i <= n; ++i) {
			long double angle1 = get<0>(vectors[i]);
			if (angle1 < 0) angle1 += 2 * PI;
			long double angle2 = get<0>(vectors[i % n + 1]);
			if (angle2 < 0) angle2 += 2 * PI;
			long double angle = fabsl(angle2 - angle1);
			// cout << angle << '\n';
			if (angle < minimal) {
				ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
				minimal = angle;
			}
		}
		cout << ans.first << ' ' << ans.second << '\n';
		return 0;
	}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i < n; ++i) {
		long double x1 = get<1>(vectors[i]);
		long double y1 = get<2>(vectors[i]);
		long double x2 = get<1>(vectors[i + 1]);
		long double y2 = get<2>(vectors[i + 1]);
		long double dot_product = x1 * x2 + y1 * y2;
		long double determinant = x1 * y2 - x2 * y1;
		long double angle = atan2(determinant, dot_product);
		if (angle < 0) angle += 2 * PI;
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


	#include<bits/stdc++.h>

	using namespace std;

	int main() {

		// freopen("input.txt", "r", stdin);
		// freopen("output.txt", "w", stdout);

		int n;
		cin >> n;
		long double x, y;
		vector<tuple<long double, long double, long double, int>> vectors(n + 1);
		for (int i = 1; i <= n; ++i) {
			cin >> x >> y;
			vectors[i] = {atan2(y, x), x, y, i};
		}
		sort(vectors.begin() + 1, vectors.end());
		// for (int i = 1; i <= n; ++i) {
		// 	cout << get<0>(vectors[i]) << ' ' << get<1>(vectors[i]) << ' ' << get<2>(vectors[i]) << '\n';
		// }
		long double minimal = 99999;
		pair<int, int> ans;
		for (int i = 1; i <= n; ++i) {
			// cout << i << (i) % (n) + 1 << '\n';
			long double x1x2 = get<1>(vectors[i]) * get<1>(vectors[i % n + 1]);
			long double y1y2 = get<2>(vectors[i]) * get<2>(vectors[i % n + 1]);
			long double dot_product = x1x2 + y1y2;
			long double mag_a = sqrt(pow(get<1>(vectors[i]), 2) + pow(get<2>(vectors[i]), 2));
			long double mag_b = sqrt(pow(get<1>(vectors[i % n + 1]), 2) + pow(get<2>(vectors[i % n + 1]), 2));
			long double angle = acos(dot_product / (mag_a * mag_b));
			if (angle < minimal) {
				// cout << angle << '\n';
				ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
				minimal = angle;
			}
		}
		cout << ans.first << ' ' << ans.second << '\n';
		return 0;
	}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	// for (int i = 1; i <= n; ++i) {
	// 	cout << get<0>(vectors[i]) << ' ' << get<1>(vectors[i]) << ' ' << get<2>(vectors[i]) << '\n';
	// }
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double x1 = get<1>(vectors[i]);
		long double y1 = get<2>(vectors[i]);
		long double x2 = get<1>(vectors[i % n + 1]);
		long double y2 = get<2>(vectors[i % n + 1]);
		long double dot_product = x1 * x2 + y1 * y2;
		long double determinant = x1 * y2 - x2 * y1;
		long double angle = atan2(determinant, dot_product);
		// long double angle = atan2(dot_product, determinant);
		if (angle < 0) angle += 2 * PI;
		// if (angle < PI) angle = PI - angle;
		// cout << angle << '\n';
		if (angle <= minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	double x, y;
	vector<tuple<double, double, double>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan(y / x), x, y};
	}
	sort(vectors.begin() + 1, vectors.end());
	// for (int i = 1; i <= n; ++i) {
	// 	cout << get<0>(vectors[i]) << ' ' << get<1>(vectors[i]) << ' ' << get<2>(vectors[i]) << '\n';
	// }
	double minimal = 99999;
	pair<int, int> ans;
	for (int i = 1; i < n; ++i) {
		double x1x2 = get<1>(vectors[i]) * get<1>(vectors[i + 1]);
		double y1y2 = get<2>(vectors[i]) * get<2>(vectors[i + 1]);
		double dot_product = x1x2 + y1y2;
		double mag_a = sqrt(pow(get<1>(vectors[i]), 2) + pow(get<2>(vectors[i]), 2));
		double mag_b = sqrt(pow(get<1>(vectors[i + 1]), 2) + pow(get<2>(vectors[i + 1]), 2));
		double angle = acos(dot_product / (mag_a * mag_b));
		// cout << angle << '\n';
		if (angle < minimal) {
			ans = {i, i + 1};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	double x, y;
	vector<tuple<double, double, double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	// for (int i = 1; i <= n; ++i) {
	// 	cout << get<0>(vectors[i]) << ' ' << get<1>(vectors[i]) << ' ' << get<2>(vectors[i]) << '\n';
	// }
	double minimal = 99999;
	pair<int, int> ans;
	for (int i = 1; i < n; ++i) {
		double x1x2 = get<1>(vectors[i]) * get<1>(vectors[i + 1]);
		double y1y2 = get<2>(vectors[i]) * get<2>(vectors[i + 1]);
		double dot_product = x1x2 + y1y2;
		double mag_a = sqrt(pow(get<1>(vectors[i]), 2) + pow(get<2>(vectors[i]), 2));
		double mag_b = sqrt(pow(get<1>(vectors[i + 1]), 2) + pow(get<2>(vectors[i + 1]), 2));
		double angle = acos(dot_product / (mag_a * mag_b));
		if (angle < minimal) {
			// cout << angle << '\n';
			ans = {get<3>(vectors[i]), get<3>(vectors[i + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double angle1 = get<0>(vectors[i]);
		if (angle1 < 0) angle1 += 2 * PI;
		long double angle2 = get<0>(vectors[i % n + 1]);
		if (angle2 < 0) angle2 += 2 * PI;
		long double angle = fabsl(angle2 - angle1);
		angle = min(angle, 2 * PI - angle);
		// cout << angle << '\n';
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double angle1 = get<1>(vectors[i]);
		long double angle2 = get<1>(vectors[i % n + 1]);
		long double angle = angle2 - angle1;
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i < n; ++i) {
		long double x1 = get<1>(vectors[i]);
		long double y1 = get<2>(vectors[i]);
		long double x2 = get<1>(vectors[i + 1]);
		long double y2 = get<2>(vectors[i + 1]);
		long double dot_product = x1 * x2 + y1 * y2;
		long double determinant = x1 * y2 - x2 * y1;
		long double angle = atan2(determinant, dot_product);
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double angle1 = get<0>(vectors[i]);
		long double angle2 = get<0>(vectors[i % n + 1]);
		long double angle = (long double) fabs(angle2 - angle1);
		if (angle < minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

const long double PI = acos(-1.0);

int main() {

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int n;
	cin >> n;
	long double x, y;
	vector<tuple<long double, long double, long double, int>> vectors(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> x >> y;
		vectors[i] = {atan2(y, x), x, y, i};
	}
	sort(vectors.begin() + 1, vectors.end());
	long double minimal = 1e100;
	pair<int, int> ans;
	for (int i = 1; i <= n; ++i) {
		long double x1 = get<1>(vectors[i]);
		long double y1 = get<2>(vectors[i]);
		long double x2 = get<1>(vectors[i % n + 1]);
		long double y2 = get<2>(vectors[i % n + 1]);
		long double dot_product = x1 * x2 + y1 * y2;
		long double determinant = x1 * y2 - x2 * y1;
		long double angle = atan2(determinant, dot_product);
		if (angle <= minimal) {
			ans = {get<3>(vectors[i]), get<3>(vectors[i % n + 1])};
			minimal = angle;
		}
	}
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


//////// Kelvin 2015
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <unordered_map>
#include <ctime>
#include <fstream>
#include <sstream>
//#include <windows.h>
//#include <stdint.h>
using namespace std;
#define INF 0x3f3f3f3f
#define EPS 1e-9
#define PI  (acos(-1.0))
typedef long long ll;
typedef pair<int, int> ii;
#define forn(i,s,n) i = (s); for( int _n = (int)(n), _di = (i > _n)?-1:1; i != _n; i += _di)
#define foreach(it,c) for ( auto it = (c).begin(); it!=(c).end(); it++)

#define BIN__N(x) (x) | x>>3 | x>>6 | x>>9
#define BIN__B(x) (x) & 0xf | (x)>>12 & 0xf0
#define BIN8(v) (BIN__B(BIN__N(0x##v)))
//#define _CRT_SECURE_NO_WARNINGS

int main()
{
    int n, i;
    cin>>n;
    double x, y;
    pair<double, int> *ans = new pair<double, int>[n];
    forn(i,0,n)
    {
        cin>>x>>y;
        ans[i] = make_pair(acos((x/sqrt((x*x+y*y))))*((y>=0.)?1.:-1.),i+1);
    }

    sort(ans,ans+n);
    double mdelta = 10000., delta;
    int ind = 0;
    forn(i,0,n-1)
    {
        delta = ans[i+1].first - ans[i].first;
        if(delta<mdelta){ mdelta = delta; ind = i;}
    }
    delta = ans[0].first+2.*PI - ans[n-1].first;
    if(delta<mdelta){ mdelta = delta; ind = n-1;}

    cout<<ans[ind].second<<" "<<ans[(ind+1)%n].second<<endl;

    return 0;
}


//////// Kelvin 2015
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <unordered_map>
#include <ctime>
#include <fstream>
#include <sstream>
//#include <windows.h>
//#include <stdint.h>
using namespace std;
#define INF 0x3f3f3f3f
#define EPS 1e-9
#define PI  (acos(-1.0))
typedef long long ll;
typedef pair<int, int> ii;
#define forn(i,s,n) i = (s); for( int _n = (int)(n), _di = (i > _n)?-1:1; i != _n; i += _di)
#define foreach(it,c) for ( auto it = (c).begin(); it!=(c).end(); it++)

#define BIN__N(x) (x) | x>>3 | x>>6 | x>>9
#define BIN__B(x) (x) & 0xf | (x)>>12 & 0xf0
#define BIN8(v) (BIN__B(BIN__N(0x##v)))
//#define _CRT_SECURE_NO_WARNINGS

int const N = 1e5+1;

int iX[N], iY[N], id[N];

int getFourth (int x, int y) {
    if (x >= 0)
    {
        return y >= 0 ? 1 : 2;
    }
    else
    {
        return y < 0 ? 3 : 4;
    }
}

int comparer(int i, int j)
{
    int c = getFourth(iX[i], iY[i]) - getFourth(iX[j], iY[j]);
    if (c != 0) return c > 0;
    return iX[i] * iY[j] > iX[j] * iY[i];
}

//
//
//void diff(ull2 &a, ull2 &b)
//{
//  a.val[0] -= b.val[0];
//  if(a.val[1]<b.val[1])
//  {
//      a.val[1] =  ~(0ull) - b.val[1] + a.val[1] + 1;
//      a.val[0]--;
//  }
//  else
//  {
//      a.val[1] -= b.val[1];
//  }
//}
//
//
//
//void shr(ull2 &b)
//{
//  b.val[1] >>= 1;
//  b.val[1] |= b.val[0]<<63;
//  b.val[0] >>= 1;
//}

struct ull2
{
    ull2()
    {
        val[0] = 0;
        val[1] = 0;
    }
    bool any()
    {
        return val[0] || val[1];
    }
    unsigned long long val[2];
};

bool cmp(ull2 &a, ull2 &b)
{
    return (a.val[0]>b.val[0] || a.val[0]==b.val[0] && a.val[1]>=b.val[1]);
}

void summ(ull2 &a, ull2 &b)
{
    if(a.val[1] + b.val[1] < a.val[1] || a.val[1] + b.val[1] < b.val[1]) a.val[0]++;
    a.val[1] += b.val[1];
    a.val[0] += b.val[0];
}

void shl(ull2 &b)
{
    b.val[0] <<= 1;
    b.val[0] |= b.val[1]>>63;
    b.val[1] <<= 1;
}

bool isLarger(ll a1, ll a2, ll b1, ll b2)
{
    ull2 bits[4];
    bits[0].val[1] = a1 & (~(1ll<<63));
    bits[1].val[1] = a1 & (~(1ll<<63));
    bits[2].val[1] = b1 & (~(1ll<<63));
    bits[3].val[1] = b1 & (~(1ll<<63));

    int i;
    forn(i,0,64)
    {
        if((1ll<<i)&a2)
        {
            summ(bits[0], bits[1]);
        }
        if((1ll<<i)&b2)
        {
            summ(bits[2], bits[3]);
        }
        shl(bits[1]);
        shl(bits[3]);
    }

    if(((a1>>63)^(a2>>63)) < ((b1>>63)^(b2>>63))) return true;

    return cmp(bits[0], bits[2]);
}

int main() {
    int n, it;
    cin>>n;

    forn(it,0,n)
    {
        cin>>iX[it]>>iY[it];
        id[it] = it;
    }

    sort(id, id + n, comparer);

    ll best = 1e17;
    ll zeBest = 1;
    int ansi = 0;
    int ansj = 1;
    for (it = 0; it < n; it++)
    {
        int i = id[it];
        int j = id[(it + 1) % n];
        ll nBe = iX[i] * iY[j] - iX[j] * iY[i];
        nBe *= nBe;

        ll nZeBe = 1;
        nZeBe *= (iX[i] * iX[i] + iY[i] * iY[i]);
        nZeBe *= (iX[j] * iX[j] + iY[j] * iY[j]);

        int nCos = iX[i] * iX[j] + iY[j] * iY[i];
        if(nCos < 0) nBe = nZeBe*4 - nBe;

        if (isLarger(best, nZeBe, nBe, zeBest))
        {
            ansi = i;
            ansj = j;
            best = nBe;
            zeBest = nZeBe;
        }
    }

    cout<< ansi + 1<<" "<< ansj + 1<<endl;

    return 0;
}


//////// Kelvin 2015
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <unordered_map>
#include <ctime>
#include <fstream>
#include <sstream>
//#include <windows.h>
//#include <stdint.h>
using namespace std;
#define INF 0x3f3f3f3f
#define EPS 1e-9
#define PI  (acos(-1.0))
typedef long long ll;
typedef pair<int, int> ii;
#define forn(i,s,n) i = (s); for( int _n = (int)(n), _di = (i > _n)?-1:1; i != _n; i += _di)
#define foreach(it,c) for ( auto it = (c).begin(); it!=(c).end(); it++)

#define BIN__N(x) (x) | x>>3 | x>>6 | x>>9
#define BIN__B(x) (x) & 0xf | (x)>>12 & 0xf0
#define BIN8(v) (BIN__B(BIN__N(0x##v)))
//#define _CRT_SECURE_NO_WARNINGS

int const N = 1e5+1;

int iX[N], iY[N], id[N];

int getFourth (int x, int y) {
    if (x >= 0)
    {
        return y >= 0 ? 1 : 2;
    }
    else
    {
        return y < 0 ? 3 : 4;
    }
}

int comparer(int i, int j)
{
    int c = getFourth(iX[i], iY[i]) - getFourth(iX[j], iY[j]);
    if (c != 0) return c > 0;
    return iX[i] * iY[j] > iX[j] * iY[i];
}

int main() {
    int n, it;
    cin>>n;

    forn(it,0,n)
    {
        cin>>iX[it]>>iY[it];
        id[it] = it;
    }

    sort(id, id + n, comparer);

    ll best = 1e16;
    ll zeBest = 1;
    int ansi = 0;
    int ansj = 1;
    for (it = 0; it < n; it++)
    {
        int i = id[it];
        int j = id[(it + 1) % n];
        ll nBe = iX[i] * iX[j] + iY[i] * iY[j];
        nBe *= -abs(nBe);

        ll nZeBe = 1;
        nZeBe *= (iX[i] * iX[i] + iY[i] * iY[i]);
        nZeBe *= (iX[j] * iX[j] + iY[j] * iY[j]);

        if (best*1.*nZeBe > nBe*1.*zeBest)
        {
            ansi = i;
            ansj = j;
            best = nBe;
            zeBest = nZeBe;
        }
    }

    cout<< ansi + 1<<" "<< ansj + 1<<endl;

    return 0;
}