#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    double lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

int getQ(int i) {
    Point pt = p[i];
    if (pt.x <= 0 && pt.y < 0)
        return 1;
    else if (pt.x > 0 && pt.y <= 0)
        return 2;
    else if (pt.x >= 0 && pt.y > 0)
        return 3;
    else
        return 4;
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        Point A = p[ai], B = p[bi];
        return atan2((double)A.y, A.x) < atan2((double)B.y, B.x);
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i + 1]], B = p[idx[i]];
        double tmp = atan2((double)(A << B), A * B);
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    double lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

int getQ(int i) {
    Point pt = p[i];
    if (pt.x <= 0 && pt.y < 0)
        return 1;
    else if (pt.x > 0 && pt.y <= 0)
        return 2;
    else if (pt.x >= 0 && pt.y > 0)
        return 3;
    else
        return 4;
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        Point A = p[ai], B = p[bi];
        return atan2((double)A.y, A.x) < atan2((double)B.y, B.x);
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i + 1]], B = p[idx[i]];
        double tmp = fabs(atan2((double)(A << B), A * B));
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    double lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return p[bi].x * p[ai].x > 0 ? p[ai].y * p[bi].x < p[ai].x * p[bi].y : p[ai].y * p[bi].x > p[ai].x * p[bi].y;
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i + 1]], B = p[idx[i]];
        double tmp = atan2(A.y, A.x) - atan2(B.y, B.x);
        tmp += tmp < 0 ? 2 * PI : 0;
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
double angle[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        angle[i] = atan2((double)y, (double)x);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return angle[ai] < angle[bi];
    });

    angle[n] = angle[idx[0]] + 2 * PI;
    idx[n] = n;

    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  angle[idx[i + 1]] - angle[idx[i]];
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1] == n ? idx[0] : idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    lli lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(1.0 * lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

int getQ(lli x, lli y) {
    if (x < 0 && y < 0)
        return 6;
    else if (x == 0 && y < 0)
        return 7;
    else if (x > 0 && y < 0)
        return 8;
    else if (x > 0 && y == 0)
        return 1;
    else if (x > 0 && y > 0)
        return 2;
    else if (x == 0 && y > 0)
        return 3;
    else if (x < 0 && y > 0)
        return 4;
    else if(x < 0 && y == 0)
        return 5;
}

bool cmp(lli x1, lli y1, lli x2, lli y2) {
    int q1 = getQ(x1, y1);
    int q2 = getQ(x2, y2);
    if (q1 != q2)
        return q1 < q2;
    return y1 * x2 < y2 * x1;
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return cmp(p[ai].x, p[ai].y, p[bi].x, p[bi].y);
    });

    lli minX, minY;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i]], B = p[idx[(i + 1) % n]];
        lli y = A >> B;
        lli x = A * B;
        if (a == -1 || cmp(x, y, minX, minY)) {
            minX = x, minY = y;
            a = idx[i], b = idx[(i + 1) % n];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

int main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return 0;
#endif
    }
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    lli lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

int getQ(lli x, lli y) {
    if (x < 0 && y < 0)
        return 1;
    else if (x == 0 && y < 0)
        return 2;
    else if (x > 0 && y < 0)
        return 3;
    else if (x > 0 && y == 0)
        return 4;
    else if (x > 0 && y > 0)
        return 5;
    else if (x == 0 && y > 0)
        return 6;
    else if (x < 0 && y > 0)
        return 7;
    else if(x < 0 && y == 0)
        return 8;
}

bool cmp(lli x1, lli y1, lli x2, lli y2) {
    int q1 = getQ(x1, y1);
    int q2 = getQ(x2, y2);
    if (q1 != q2)
        return q1 < q2;
    return y1 * x2 < y2 * x1;
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return cmp(p[ai].x, p[ai].y, p[bi].x, p[bi].y);
    });

    lli minX, minY;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i]], B = p[idx[(i + 1) % n]];
        lli y = A >> B;
        lli x = A * B;
        if (a == -1 || cmp(x, y, minX, minY)) {
            minX = x, minY = y;
            a = idx[i], b = idx[(i + 1) % n];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

int main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return 0;
#endif
    }
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
double angle[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        angle[i] = atan2((double)y, (double)x);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return angle[ai] < angle[bi];
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  angle[idx[i + 1]] - angle[idx[i]];
        tmp += tmp < 0 ? 2 * PI: 0;
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
int x[MAX];
int y[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        scanf("%d%d", &x[i], &y[i]);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return y[ai] * x[bi] < y[bi] * x[ai];
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  atan2((double)y[idx[i + 1]], (double)x[idx[i + 1]]) - atan2((double)y[idx[i]], (double)x[idx[i]]);
        tmp += tmp < 0 ? 2 * PI: 0;
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
double angle[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        angle[i] = atan2((double)y, (double)x);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return angle[ai] < angle[bi];
    });

    angle[n] = angle[idx[0]] + 2 * PI;
    idx[n] = n;

    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  angle[idx[i + 1]] - angle[idx[i]];
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1] % n;
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
int x[MAX];
int y[MAX];
int idx[MAX];

void clear() {
}

void solve() {
 printf("123"); return;
    for (int i = 0; i < n; i++) {
        scanf("%d%d", &x[i], &y[i]);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return y[ai] * x[bi] < y[bi] * x[ai];
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  atan2((double)y[idx[i + 1]], (double)x[idx[i + 1]]) - atan2((double)y[idx[i]], (double)x[idx[i]]);
        tmp += tmp < 0 ? 2 * PI: 0;
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    double lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return p[bi].x * p[ai].x > 0 ? p[ai].y * p[bi].x < p[ai].x * p[bi].y : p[ai].y * p[bi].x > p[ai].x * p[bi].y;
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i + 1]], B = p[idx[i]];
        double tmp = atan2((double)A.y, A.x) - atan2((double)B.y, B.x);
        tmp += tmp < 0 ? 2 * PI : 0;
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
double angle[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        angle[i] = atan2((double)y, (double)x);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return angle[ai] < angle[bi];
    });

    angle[n] = angle[idx[0]] + 2 * PI;
    idx[n] = n;
    n++;

    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  abs(angle[idx[i + 1]] - angle[idx[i]]);
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1] % n;
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    double lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

int getQ(int i) {
    Point pt = p[i];
    if (pt.x <= 0 && pt.y < 0)
        return 1;
    else if (pt.x > 0 && pt.y <= 0)
        return 2;
    else if (pt.x >= 0 && pt.y > 0)
        return 3;
    else
        return 4;
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        Point A = p[ai], B = p[bi];
        return atan2((double)A.y, A.x) < atan2((double)B.y, B.x);
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i + 1]], B = p[idx[i]];
        double tmp = atan2(A << B, A * B);
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
double angle[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        angle[i] = atan2((double)y, (double)x);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return angle[ai] < angle[bi];
    });

    angle[n] = angle[0] + 2 * PI;
    idx[n] = n;
    n++;

    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        double tmp =  abs(angle[idx[i + 1]] - angle[idx[i]]);
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1] % n;
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

const int MAX = 1e5 + 10;
int n;
long double ang[MAX];
int idx[MAX];

void clear() {
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        ang[i] = atan2(1.0 * y, 1.0 * x);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        return ang[ai] < ang[bi];
    });

    long double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        long double tmp = ang[idx[(i + 1) % n]] - ang[idx[i]];
        tmp += tmp < 0 ? 2 * acos(-1.) : 0;
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[(i + 1) % n];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

int main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return 0;
#endif
    }
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <memory.h>
#include <string.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <cassert>

using namespace std;
typedef long long lli;
typedef vector<int> vi;
typedef pair<int, int> pii;

//#define _LOCAL_DEBUG_
#ifdef _LOCAL_DEBUG_
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#else
#define eprintf(...)
#endif

#pragma region geometry_int
// see http://e-maxx.ru/bookz/files/andreeva.pdf for geometry
// coords should be in [-1e9, 1e9]

bool between(lli l, lli r, lli x) {
    if (l > r) swap(l, r);
    return l <= x && x <= r;
}

struct Point {
    lli x, y;
    Point(lli _x, lli _y) : x(_x), y(_y) {}
    Point() {}

    Point operator +(const Point &b) const { return Point(x + b.x, y + b.y); }
    Point operator -(const Point &b) const { return Point(x - b.x, y - b.y); }
    bool operator ==(const Point b) const { return x == b.x && y == b.y; }
    bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }

    Point operator *(const lli m) const { return Point(x * m, y * m); }
    Point operator /(const lli m) const { assert(m != 0);  return Point(x / m, y / m); }
    double lengthSqr() const { return x * x + y * y; }
    double length() const { return sqrt(lengthSqr()); }

    // cross product
    lli operator>>(const Point &p) const { return x * p.y - y * p.x; }
    lli operator<<(const Point &p) const { return p.x * y - p.y * x; }
    bool operator||(const Point &p) const { return *this >> p == 0; }

    // scalar/dot product
    lli operator*(const Point &p) const { return x * p.x + y * p.y; }

    void eprint() {
        eprintf("DEBUG: (%lld, %lld)\n", x, y);
    }
};

// Check if two vectors are collinear
bool colinear(const Point p1, const Point p2) {
    return p1 || p2;
}

// Check if two vectors are unidirected
bool unidirected(const Point p1, const Point p2) {
    if (!(p1 || p2))
        return false;
    return p1.x * p2.x > 0 && p1.y * p2.y > 0;
}

// Check if two vectors are orthogonal
bool orthogonal(const Point p1, const Point p2) {
    return p1 * p2 == 0;
}
#pragma endregion geometry_int

const int MAX = 1e5 + 10;
const double PI = 3.1415926535897932384626433832795;
int n;
Point p[MAX];
int idx[MAX];

void clear() {
}

int getQ(int i) {
    Point pt = p[i];
    if (pt.x <= 0 && pt.y < 0)
        return 1;
    else if (pt.x > 0 && pt.y <= 0)
        return 2;
    else if (pt.x >= 0 && pt.y > 0)
        return 3;
    else
        return 4;
}

void solve() {
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d%d", &x, &y);
        p[i] = Point(x, y);
        idx[i] = i;
    }

    sort(idx, idx + n, [](const int &ai, const int &bi) -> bool {
        Point A = p[ai], B = p[bi];
        return atan2((long double)A.y, A.x) < atan2((long double)B.y, B.x);
    });

    idx[n] = idx[0];
    double ans = 1e9;
    int a = -1, b = -1;
    for (int i = 0; i < n; i++) {
        Point A = p[idx[i + 1]], B = p[idx[i]];
        double tmp = fabs(atan2((long double)(A << B), A * B));
        if (tmp < ans) {
            ans = tmp;
            a = idx[i], b = idx[i + 1];
        }
    }

    printf("%d %d\n", a + 1, b + 1);
}

void main() {
#ifdef _LOCAL_VAN
    freopen("in.txt", "r", stdin);
#endif
    while (scanf("%d", &n) == 1) {
        clear();
        solve();
#ifndef _LOCAL_VAN
        return;
#endif
    }
    return;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include "stdio.h"
#include <cstdio>
#include <string>
#include <cmath>

using namespace std;

//typedef  pair<double,double> p;
int n, i, f, s;
double x,y, mina, u;
pair<double, int> t[100000];

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);
	double pi = 2*  atan2(0.0,-1.0);
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>x>>y;
		t[i].first = atan2(y,x);
		t[i].second = i + 1;
	}
	sort(t,t+n);
	f = 1;	s = n;
	mina = t[0].first + pi - t[n-1].first;
	for (i=1;i<n;i++)
	{
		if (mina>(u = t[i].first-t[i-1].first))
		{
			mina = u;
			f = t[i-1].second;
			s = t[i].second;
		}
	}
	cout<<f<<" "<<s<<endl;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include "stdio.h"
#include <cstdio>
#include <string>
#include <cmath>

using namespace std;

//typedef  pair<double,double> p;
int n, i, f, s;
double x,y, mina, u;
pair<double, int> t[100000];

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);
	double pi = atan2(0.0,-1.0);
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>x>>y;
		t[i].first = atan2(y,x);
		t[i].second = i + 1;
	}
	sort(t,t+n);
	f = t[0].second;	s = t[n-1].second;
	mina = t[0].first + 2*pi - t[n-1].first;
	for (i=1;i<n;i++)
	{
		if (mina>(u = t[i].first-t[i-1].first))
		{
			mina = u;
			f = t[i-1].second;
			s = t[i].second;
		}
	}
	cout<<f<<" "<<s<<endl;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include "stdio.h"
#include <cstdio>
#include <string>
#include <cmath>

using namespace std;

typedef  pair<double,double> p;
int n, i, f, s, l;
double x,y, mina, u;
pair<p, int> t[100000];

bool cmp (pair<p, int> a, pair<p, int> b)
{
	double l = atan2(a.first.second,a.first.first);
	double r = atan2(b.first.second,b.first.first);
	return (l>r);
}

bool wat(pair<p, int> a, pair<p, int> b, pair<p, int> c, pair<p, int> d)
{
	long long ax = a.first.first;
	long long bx = b.first.first;
	long long cx = c.first.first;
	long long dx = d.first.first;
	long long ay = a.first.second;
	long long by = b.first.second;
	long long cy = c.first.second;
	long long dy = d.first.second;

	long long w = (cx*dy-cy*dx);
	if (w<0) w*=-1;
	w *=(ax*bx+ay*by);
	long long q = (ax*by-ay*bx);
	if (q<0) q*=-1;
	q*=(cx*dx+cy*dy);
	return ((w-q)<0);

}

int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	double pi = atan2(0.0,-1.0);
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>t[i].first.first>>t[i].first.second;
		t[i].second = i + 1;
	}
	sort(t,t+n,cmp);
	l = 0;
	for (i=1;i<n;i++)
	{
		if (wat(t[l],t[(l+1)%n],t[i],t[(i+1)%n]))
		l = i;
	}
	cout<<t[l].second<<" "<<t[(l+1)%n].second<<endl;
}


from math import atan2

s = lambda a, b: a[0] * b[0] + a[1] * b[1]
v = lambda a, b: a[0] * b[1] - a[1] * b[0]

p = []
for i in range(int(input())):
    x, y = map(int, input().split())
    p.append((atan2(x, y), (x, y), i + 1))
p.sort()

d = [(s(a, b), abs(v(a, b)), i, j) for (x, a, i), (y, b, j) in zip(p, p[1:] + p[:1])]
x = d[0]

for y in d:
    if v(y[:2], x[:2]) > 0: x = y

print(x[2], x[3])


t = int(input())

for _ in range(t):
    n = int(input())
    s = input()
    ans = True
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i - 1])) not in (0, 2):
            ans = False
            break
    print('YES' if ans else 'NO')


t = int(input())
a = [input() for i in range(2 * t)]

for i in range(t):
    n = int(a[2 * i])
    s = a[2 * i + 1]

    f = 0

    for i in range(n // 2):
        res = abs(ord(s[i]) - ord(s[n - i - 1]))
        if res != 0 and res != 2:
            f = 1

    if f == 1:
        print("NO")
    else:
        print("YES")


t = int(input().strip())

for _ in range(t):
    ans = "YES"
    n = int(input().strip())
    s = input().strip()

    for i in range(int(len(s)/2)):
        if abs(ord(s[i])-ord(s[-i-1])) > 2 or abs(ord(s[i])-ord(s[-i-1])) == 1:
            ans = "NO"
            break

    print(ans)


t = int(input())
for i in range(n):
    n = int(input())
    a = input()
    ans = 0
    for j in range(n):
        if abs(ord(a[j]) - ord(a[n-j-1])) > 2:
            ans += 1
    if ans:
        print('NO')
    else:
        print('YES')


t = int(input())
for i in range(t):
    n = int(input())
    a = input()
    ans = 0
    for j in range(n):
        if abs(ord(a[j]) - ord(a[n-j-1])) > 2 or ord(a[j]) % 2 != ord(a[n-j-1]) % 2:
            ans += 1
    if ans:
        print('NO')
    else:
        print('YES')


t = int(input())
for i in range(t):
    n = int(input())
    a = input()
    ans = 0
    for j in range(n):
        if abs(ord(a[j]) - ord(a[n-j-1])) > 2:
            ans += 1
    if ans:
        print('NO')
    else:
        print('YES')


for _ in range(int(input().strip())):
	n = int(input().strip())
	s = input().strip()
	i = 0
	j = n-1
	ans = 'YES'
	if s == s[::-1]:
		print(ans)
	else:
		while i < j:
			if abs(ord(s[i]) - ord(s[j])) != 2 and abs(ord(s[i]) - ord(s[j])) != 0:
				ans = 'NO'
				break
			i += 1
			j -= 1
		print(ans)


def ehPalindromoTwist(word, size):

    metade = size // 2
    i = 0
    ehPalindromoTwist = True
    while i < metade and ehPalindromoTwist:
        if word[i] != word[size - i - 1]:
            numAscii1 = ord(word[i])
            numAscii2 = ord(word[size - i - 1])
            c1 = { numAscii1 - 1, numAscii1, numAscii1 + 1 }
            c2 = { numAscii2 - 1, numAscii2, numAscii2 + 1 }
            resultado = c1.intersection(c2)
            cond1 = len(resultado) > 0
            cond2 = numAscii1 not in resultado
            cond3 = numAscii2 not in resultado
            ehPalindromoTwist = cond1 and cond2 and cond3
        i += 1

    return ehPalindromoTwist

n = int(input())

for i in range(n):
    size = int(input())
    word = str(input())
    resp = ehPalindromoTwist(word, size)
    if(resp):
      print('YES')
    else:
      print('NO')


def check(s, n) :
    for i in range (n // 2) :
            if  abs(ord(s[i]) - ord(s[n - 1 - i])) == 2 or abs(ord(s[i]) - ord(s[n - 1 - i])) == 0 :
                        continue
            else :
                print('NO')
                return
    print('YES')
    return
for _ in range( int(input()) ) :
    n = int(input())
    s = input()
    check(s, n)


from sys import stdin

def is_last(c):
    if c == 'a' or c == 'z':
        return True
    return False

def sol(s):
    for i in range(len(s) // 2):
        if s[i] == s[len(s) - i - 1]:
            continue

        if is_last(s[i]) and is_last(s[len(s) - i - 1]):
            return "NO"

        if abs(ord(s[i]) - ord(s[len(s) - i - 1])) != 2:
            return "NO"

    return "YES"

t = int(stdin.readline())

for it in range(t):
    stdin.readline()
    s = stdin.readline().rstrip()
    print(sol(s))


n=int(input())
alp ="abcdefghijklmnopqrstuvwxyz"
for i in range(n):
    x=int(input())
    s=input()
    mid=int(len(s)/2)
    #print(s)
    if s[:mid]==s[mid+1:]:
        print("YES")
    else:
        a=0
        for j in range(mid):
            if abs(ord(s[j])-ord(s[-j-1]))==2 or abs(ord(s[j])-ord(s[-j-1]))==0:
                a+=1
        if a==mid:
            print("YES")
        else:
            print("NO")


##  1027A

for _ in range(int(input())):
	a=int(input())
	s=list(input())
	i=0
	ans=0
	while i<(a//2):
		if ord(s[a-i-1])-2 == ord(s[i]) or ord(s[i]) == ord(s[a-i-1])+2 or ord(s[i]) == ord(s[a-i-1]):
			pass
		else:
			ans=1
			break
		i+=1
		if i>a//2:
			break
	if ans==0:
		print('YES')
	else:
		print("NO")


for _ in range(int(input())):
    n  =int(input())
    s = input()
    ans = "YES"
    for i in range(n//2):
        if(abs(ord(s[i])-ord(s[n-i-1]))>2 or abs(ord(s[i])-ord(s[n-i-1]))==1):
            ans = "NO"
            break
    print(ans)


import sys
from array import array  # noqa: F401

def readline(): return sys.stdin.buffer.readline().decode('utf-8')

t = int(readline())
for _ in range(t):
    n = int(readline())
    s = readline().rstrip()
    if all(abs(ord(s[i]) - ord(s[n-i-1])) in (0, 2) for i in range(n)):
        print('YES')
    else:
        print('NO')


x=["a","b","c","d","e","f","g","h","i",
    "j","k","l","m","n","o","p","q",
    "r","s","t","u","v","w","x","y","z"]
n=int(input())
xxx=[]
for i in range(n):
    m=int(input())
    z=list(map(str,input()))
    j,k=0,m-1
    ans="YES"
    while j!=m/2:
        if abs(x.index(z[j])-x.index(z[k]))>2 or abs(x.index(z[j])-x.index(z[k]))==1:
            ans="NO"
            break
        j+=1
        k-=1
    xxx.append(ans)
for i in xxx:
    print(i)


x=["a","b","c","d","e","f","g","h","i",
    "j","k","l","m","n","o","p","q",
    "r","s","t","u","v","w","x","y","z"]
n=int(input())
xxx=[]
for i in range(n):
    m=int(input())
    z=list(map(str,input()))
    j,k=0,m-1
    ans="YES"
    while j!=m/2:
        if abs(x.index(z[j])-x.index(z[k]))>2 or abs(x.index(z[j])-x.index(z[k]))==1:
            ans="NO"
            break
        j+=1
        k-=1
    xxx.append(ans)
print(i for i in xxx)


#https://codeforces.com/problemset/problem/1027/A
t=int(input())
for i in range(t):
	n=int(input())
	s=input()
	i=0
	flag=True
	while(i<int(n/2) and flag):
		if(s[i]=="z"):
			if(s[n-i-1]!="x" and s[n-i-1]!=s[i]):
				flag=False
		elif(s[i]=="a"):
			if(s[n-i-1]!=s[i] and s[n-i-1]!="c"):
				flag=False
		elif(s[n-i-1]=="a"):
			if(s[i]!="c" and s[i]!=s[n-i-1]):
				flag=False
		elif(s[n-i-1]=="z"):
			if(s[i]!="x" and s[i]!=s[n-i-1]):
				flag=False
		else:
			if(s[i]=="y"):
				if(s[n-i-1]!="y" and s[n-i-1]!="w"):
					flag=False
			elif(s[i]=="b"):
				if(s[n-i-1]!="b" and s[n-i-1]!="d"):
					flag=False

			elif(s[n-i-1]=="y"):
				if(s[i]!="y" and s[i]!="w"):
					flag=False
			elif(s[n-i-1]=="b"):
				if(s[i]!="b" and s[i]!="d"):
					flag=False

			else:
				p = s[i]
				q = ord(s[i])
				r = chr(q-2)
				l = chr(q+2)
				if(s[n-i-1]!=p and s[n-i-1]!=r and s[n-i-1]!=l):
					flag=False

		i=i+1

	if(flag==False):
		print("NO")
	else:
		print("YES")


def next(c):
    if c == 'z':
        return 'y'
    return chr(ord(c) + 1)

def prev(c):
    if c == 'a':
        return 'b'
    return chr(ord(c) - 1)

def pal(string):
    for i in range(len(string) // 2):
        if string[i] == string[len(string) - i - 1] or next(string[i]) == prev(string[len(string) - i - 1]) or prev(
                string[i]) == next(string[len(string) - i - 1]):
            continue
        return False
    return True

def main():
    n = int(input())

    for i in range(n):
        input()
        string = input()
        print("YES" if pal(string) else "NO")

if __name__ == "__main__":
    main()


def main():
    n, m = map(int, input().split())

    a = b = (-1, -1)

    for i in range(n):
        string = input()
        idx = string.find('B')
        ridx = string.rfind('B')

        if idx != -1 and a[0] == -1:
            a = (i, idx)
        if ridx != -1:
            b = (i, ridx)

    print(str(1 + (a[0] + b[0]) // 2) + " " + str(1 + (a[1] + b[1]) // 2))

if __name__ == "__main__":
    main()


# h,w = map(int, input().split(' '))
# r = list(map(int, input().split(' ')))
# c = list(map(int, input().split(' ')))
# l,r = map(int, input().split(' '))
# for i in range(l, r+1):
#     if len(str(i)) == len(list(set(str(i)))):
#         print(i)
#         exit()
# print(-1)
t = int(input())
import string
string = string.ascii_lowercase
while t > 0:
    n = int(input())
    s = input()
    res = True
    for i in range(n//2):
        if s[i] == s[n-i-1] or abs(ord(s[i])-ord(s[i-n-1])) == 2:
            continue
        else:
            res = False
            break
    if res:
        print('YES')
    else:
        print('NO')
    t -= 1


# h,w = map(int, input().split(' '))
# r = list(map(int, input().split(' ')))
# c = list(map(int, input().split(' ')))
# l,r = map(int, input().split(' '))
# for i in range(l, r+1):
#     if len(str(i)) == len(list(set(str(i)))):
#         print(i)
#         exit()
# print(-1)
t = int(input())
import string
string = string.ascii_lowercase
while t > 0:
    n = int(input())
    s = input()
    res = True
    for i in range(n//2):
        if s[i] == s[n-i-1] or abs(ord(s[i])-ord(s[n-i-1])) == 2:
            continue
        else:
            res = False
            break
    if res:
        print('YES')
    else:
        print('NO')
    t -= 1


t=int(input())
for _ in range(t):
    n=int(input())
    s=input()

    flag=True

    for i in range(len(s)//2):
        if s[i]==s[n-i-1]:
            continue
        else:
            if abs(ord(s[i])-ord(s[n-i-1]))%26==2:
                continue
            else:
                flag=False
    if flag:
        print("YES")
    else:
        print("NO")


import sys
import math

#to read string
get_string = lambda: sys.stdin.readline().strip()
#to read list of integers
get_list = lambda: list( map(int,sys.stdin.readline().strip().split()) )
#to read integers
get_int = lambda: int(sys.stdin.readline())
#to print fast
#pt = lambda x: sys.stdout.write(str(x)+'\n')

#--------------------------------WhiteHat010--------------------------------------#
for _ in range(get_int()):
    n = get_int()
    s = get_string()
    valid = True
    for i in range(n//2):
        if s[i] != s[~i] and abs( ord(s[i]) - ord(s[~i]) ) != 2:
            valid = False
            break
    if valid:
        print("YES")
    else:
        print("NO")


def solve(s, n):
    i = 0
    while i < n//2:
        if s[i] != s[n-i-1]:
            if abs(ord(s[i])-ord(s[n-i-1])) != 2:
                return "NO"
        i += 1
    return "YES"
for _ in range(int(input())):
    n = int(input())
    s = input()
    print(solve(s, n))


for _ in range(int(input())):
    n=int(input())
    s=input()
    l=[0,2]
    c=0
    for i in range(n//2):
        if abs(ord(s[i])-ord(s[n-i-1])) not in l:
            c=1
            break
    print('YNEOS'[c::2])


n = int(input())

for i in range(n):
    m = int(input())
    l = m - 1
    s = input()
    flag = True
    for j in range(m // 2):
        if s[j] == s[l - j]:
            continue
        if abs(ord(s[j]) - ord(s[l-j])) == 2:
            continue
        else:
            print("NO")
            flag = False
            break
    if flag:
        print("YES")


for _ in range(int(input())):
    n  =int(input())
    s = input()
    ans = "YES"
    for i in range(n//2):
        if(abs(ord(s[i])-ord(s[n-i-1]))>2):
            ans = "NO"
            break
    print(ans)


for _ in range(int(input())):
    n  =int(input())
    s = input()
    ans = "YES"
    for i in range(n//2):
        if(abs(ord(s[i])-ord(s[n-i-1]))>2 and abs(ord(s[i])-ord(s[n-i-1]))!=1):
            ans = "NO"
            break
    print(ans)


for _ in range(int(input())):
    n  =int(input())
    s = input()
    ans = "YES"
    for i in range(n//2):
        if(abs(ord(s[i])-ord(s[n-i-1]))>2 or abs(ord(s[i])-ord(s[n-i-1]))!=1):
            ans = "NO"
            break
    print(ans)


t = int(input())
for i in range(t):
    n = int(input())
    s = input()
    ans = True
    for j in range(n//2):
        a = ord(s[j])
        b = ord(s[-j-1])
        if abs(b-a) > 2 or abs(b-a) == 1:
            ans = False
            break
    if ans:
        print('YES')
    else:
        print('NO')


for _ in range(int(input())):
    n  =int(input())
    s = input()
    ans = "YES"
    for i in range(n//2):
        if(abs(ord(s[i])-ord(s[n-i-1]))>2 or abs(ord(s[i])-ord(s[n-i-1]))==1):
            ans = "NO"
            break
    print(ans)


I=lambda:map(int,input().split())
for _ in range(int(input())):
    n=int(input())
    s=input()
    for i in range(n//2):
        if s[i]!='a' or s[i]!='z':
            if chr(ord(s[i])+1)!=chr(ord(s[-i-1])+1) and chr(ord(s[i])+1)!=chr(ord(s[-i-1])-1) and chr(ord(s[i])-1)!=chr(ord(s[-i-1])+1) and chr(ord(s[i])-1)!=chr(ord(s[-i-1])-1):
                print('NO');break
        elif s[i]=='a' and s[-i-1]!='z':
            if chr(ord(s[i])+1)!=chr(ord(s[-i-1])+1) and chr(ord(s[i])+1)!=chr(ord(s[-i-1])-1):
                print("NO");break
        elif s[i]=='z' and s[-i-1]!='a':
            if chr(ord(s[i])-1)!=chr(ord(s[-i-1])+1) and chr(ord(s[i])-1)!=chr(ord(s[-i-1])-1):
                print("NO");break
        else:print("NO");break
    else:
        print("YES")


import sys
readline = sys.stdin.readline

def calc(a, b):
    if a + 1 == b + 1:
        return True
    if a - 1 == b + 1:
        return True
    if a + 1 == b - 1:
        return True
    if a - 1 == b - 1:
        return True
    return False

T = int(readline())
for _ in range(T):
    N = int(readline())
    S = list(map(lambda x: ord(x) - 97, readline().strip()))
    print('YES'if all(calc(S[i], S[N-i-1]) for i in range(N//2)) else 'NO')


import sys
readline = sys.stdin.readline

def calc(a, b):
    if a > b:
        a, b = b, a
    return min(b - a, 26 + a - b)

T = int(readline())
for _ in range(T):
    N = int(readline())
    S = list(map(lambda x: ord(x) - 97, readline().strip()))
    print('YES'if all(calc(S[i], S[N-i-1]) in (0, 2) for i in range(N//2)) else 'NO')


import sys
readline = sys.stdin.readline

def calc(a, b):
    return min(abs(a-b), abs(26 - a + b))

T = int(readline())
for _ in range(T):
    N = int(readline())
    S = list(map(lambda x: ord(x) - 97, readline().strip()))
    print('YES'if all(calc(S[i], S[N-i-1]) in (0, 2) for i in range(N//2)) else 'NO')


t = int(input())
for test in range(t):
    n = int(input())
    a = list(input())
    ok = True
    for i in range(n // 2):
        ok &= abs(ord(a[i]) - ord(a[n - 1 - i])) == 0 or abs(ord(a[i]) - ord(a[n - 1 - i])) == 2
    if ok:
        print('YES')
    else:
        print('NO')


q = int(input())
for i in range(q):
    n = int(input())
    s = input()
    flag = False
    for j in range(n // 2):
        if abs(ord(s[j]) - ord(s[-j - 1])) > 2 or abs(ord(s[j]) - ord(s[-j - 1])) == 1:
            flag = True
    print('NO') if flag else print('YES')


t = int(input())
flag = True
a = "abcdefghijklmnopqrstuvwxyz"
for i in range(t):
    n = int(input())
    s = list(input())
    for j in range(n//2):
        if abs(a.index(s[j]) - a.index(s[-j-1])) == 0 or abs(a.index(s[j]) - a.index(s[-j-1])) == 2:
            continue
        else:
            print("NO")
            flag = False
            break
    if flag:
        print("YES")
    else:
        flag = True


import string
a='b'+string.ascii_lowercase+'y'

for i in int(input())*[0]:
    u=1
    c=int(input())
    b=list(input())
    for i in range(c):
        z=a[1:].find(b[i])+1
        x=[a[z-1],a[z+1]]
        b[i]=x
    print('NYOE S'[all((b[i][0] in b[c-i-1]) or (b[i][1] in b[c-i-1]) for i in range(0--c//2))::2])


def valid(a, b):
    d = abs(ord(a) - ord(b))
    return d == 0 or d == 2

T = int(input())
for _ in range(T):
    n = int(input())
    s = input()
    val = all(valid(s[i], s[n - i - 1]) for i in range(n))
    print('YES' if val else 'NO')


text_case = int(input())
for i in range(text_case):
    n = int(input())
    st = input()
    for i in range(n//2):
        x = ord(st[i])
        y = ord(st[n-i-1])
        if x + 1 == y + 1 or x + 1 == y - 1 or x - 1 == y + 1 or x - 1 == y - 1:
            continue
        else:
            print('NO')
            break
    else:
        print('YES')


Input=lambda:map(int,input().split())
Flag = False
for i in range(int(input())):
        n = int(input())
        s = input()

        for a,b in zip(s,s[::-1]):
                a,b = sorted(a+b)
                if a == b:
                        continue

                elif a == 'a':
                        if b == 'c':
                                continue
                        else:
                                print("NO")
                                Flag = True
                                break
                elif ord(a)+1 == ord(b)-1:
                        continue
                else:
                        print("NO")
                        Flag = True
                        break
        if Flag == False:
                print("YES")
        else:
                Flag = False


t = int(input())
for _ in range(t):
    n = int(input())
    s = input()
    flag = True
    for i in range(0, n//2):
        temp = abs(ord(s[i])-ord(s[n-i-1]))
        if temp != 0 and temp != 2:
            flag = False
            break
    if flag:
        print('YES')
    else:
        print('NO')


t=int(input())
for _ in range(t):
    n=int(input())
    s=input()

    flag=True

    for i in range(len(s)//2):
        if s[i]==s[n-i-1]:
            continue
        else:
            if abs(ord(s[i])-ord(s[n-i-1]))%26==2:
                continue
            else:
                flag=False
    if flag:
        print("YES")
    else:
        print("NO")


t=int(input())
for _ in range(t):
    s=input()
    flag=True
    for i in range(len(s)//2):
        if s[i]==s[n-i-1]:
            continue
        else:
            if abs(ord(s[i])-ord(s[n-i-1]))%26<=2:
                continue
            else:
                flag=False
    if flag:
        print("YES")
    else:
        print("NO")


def check(s,n):
    i=0
    j=n-1
    while i<j:
        if s[i]!=s[j]:
            a=ord(s[i])
            b=ord(s[j])
            if abs(a-b)!=2:
                return "NO"
        i+=1
        j-=1
    return "YES"

for _ in range(int(input())):
    n=int(input())
    s=input()
    print(check(s,n))


for _ in range(int(input())):
	n=int(input());a=input()
	p=sum(list(map(lambda x,y: 0 if abs(ord(x)-ord(y))==0 or abs(ord(x)-ord(y))==2 else 1,a[:n//2],a[n//2:n][::-1])))
	print('NO' if p else 'YES')


p=int(input())
for q in range(p):
	n=int(input())
	s=input()
	count=0
	for i in range(n//2):
		if abs(ord(s[i])-ord(s[n-i-1]))==0 or abs(ord(s[i])-ord(s[n-i-1]))==2:
			count+=1
	if count==n//2:
		print("YES")
	else:
		print("NO")


for t in range(int(input())):

    n = int(input())
    s = input()

    for i in range(n//2):

        if abs(ord(s[i]) - ord(s[n - i - 1])) == 1 or abs(ord(s[i]) - ord(s[n - i - 1])) > 2 :
            print('NO')
            break
    else:
        print('YES')


for t in range(int(input())):

    n = int(input())
    s = input()

    for i in range(n//2):

        if abs(ord(s[i]) - ord(s[n - i - 1])) not in (0 , 2):
            print('NO')
            break
    else:
        print('YES')


for _ in range(int(input())):
    n = int(input())
    s = input()
    f=0
    for i in range(n//2):
        if not (s[i]==s[n-i-1] or abs(ord(s[i]) - ord(s[n-i-1]))==2):
            f=1
            break
    if f:
        print("NO")
    else:
        print("YES")


for u in range(int(input())):
    n=int(input())
    s=input()
    f=0
    for i in range(n):
        x=abs(ord(s[i])-ord(s[n-1-i]))
        if(x!=0 and x!=2):
            f=1
    if(f==1):
        print("NO")
    else:
        print("YES")


for i in range(int(input())):
    k=int(input())
    p=list(input())
    n=0
    for i in range(k//2):
        if p[i]==p[(k-i)-1] or ord(p[i])+2==ord(p[(k-i)-1]) or ord(p[i])-2==ord(p[(k-i)-1]):n+=1
    print("YES" if n==k//2 else "NO")

# My codes says who I am


Letters = ['a','b','c','d','e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
t = int(input())
for i in range (t):
    l = int(input())
    a = list(input())
    for i in range (l//2):
        k = Letters.index(a[i])
        j = Letters.index(a[-i-1])
        if 0<k<25 and 0<j<25:
            if Letters[k - 1] != Letters[j-1] and Letters[k + 1] != Letters[j-1] and Letters[k - 1] != Letters[j+1] and Letters[k + 1] != Letters[j+1]:
                print("NO")
                break
        elif k == 0 and 0<j<25:
            if Letters[k + 1] != Letters[j-1] and Letters[k + 1] != Letters[j+1]:
                print("NO")
                break
        elif k==0 and j == 25:
            if Letters[k + 1] != Letters[j-1]:
                print("NO")
                break
        elif k == 25 and 0<j<25:
            if Letters[k - 1] != Letters[j-1] and Letters[k - 1] != Letters[j+1]:
                print("NO")
                break
        elif k == 25 and j == 0:
            if Letters[k - 1] != Letters[j+1]:
                print("NO")
                break
        elif 0<k<25 and j == 0:
            if Letters[k - 1] != Letters[j+1] and Letters[k + 1] != Letters[j+1]:
                print("NO")
                break
        elif 0<k<25 and j == 25:
            if Letters[k - 1] != Letters[j-1] and Letters[k + 1] != Letters[j-1]:
                print("NO")
                break
        if i == l//2 - 1:
            print("YES")


def can_do_it(n, s):
    lim = n // 2
    a = s[:lim]
    b = s[lim:][::-1]

    for i in range(lim):
        if a[i] != b[i] and abs(ord(a[i]) - ord(b[i])) != 2:
            return False

    return True

def main():
    n_tests = int(input())
    results = [''] * n_tests

    for i in range(n_tests):
        n = int(input())
        s = input()
        results[i] = 'YES' if can_do_it(n, s) else 'NO'

    print('\n'.join(results))

if __name__ == '__main__':
    main()


n=int(input())
for i in range(0,n):
	l=int(input())
	string=input()
	b=True
	for j in range(0,int(l/2)):
		if (abs(ord(string[j])-ord(string[l-j-1]))!=0 and abs(ord(string[j])-ord(string[l-j-1]))!=2):
			b=False
	print("YES" if(b) else "NO")


n=int(input())
for i in range(0,n):
	l=int(input())
	string=input()
	b=True
	for j in range(0,int(l/2)):
		if (abs(ord(string[j])-ord(string[l-j-1]))!=0,2):
			b=False
	print("YES" if(b) else "NO")


T = int(input())
for i in range(T):
    n = int(input())
    s = input()
    for j in range(n//2):
        tmp = abs(ord(s[j])) - ord(s[len(s) - (j+1)])
        if tmp == 1:
            print('NO')
            break
        elif tmp > 2:
            print('NO')
            break
    else:
        print('YES')

# CodeForcesian
# ♥
# tuesday


T = int(input())
x = 0
for i in range(T):
    n = int(input())
    s = input()
    for j in range(n//2):
        tmp = abs(ord(s[j]) - ord(s[len(s) - (j+1)]))
        if tmp == 1 or tmp > 2:
            x = 1
    else:
        print('YES' if x == 0 else 'NO')
    x = 0

# CodeForcesian
# ♥
# tuesday


import string
t = int(input())
ans = []
alpha = list(string.ascii_lowercase)
#print(alpha)
for i in range(t):
	n = int(input())
	s = list(input())
	for i in range(int(n/2)):
		x = alpha.index(s[i])
		y = alpha.index(s[n-i-1])
		#print(x,y)
		if x==y:
			flag = 0
		elif x+1==y-1:
			flag = 0
		elif x-1==y+1:
			flag = 0
		else:
			#print('err')
			flag = 1
			break
	if flag == 1:
		ans.append('NO')
	else:
		ans.append('YES')
for i in range(t):
	print(ans[i])


"""
Author    : co_devil Chirag Garg
Institute : JIIT
"""
from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd
# from bisect import bisect_left,bisect_right
# from decimal import *,threading
from fractions import Fraction

"""from io import BytesIO, IOBase
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    from builtins import str as __str__
    str = lambda x=b'': x if type(x) is bytes else __str__(x).encode()
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._buffer = BytesIO()
        self._fd = file.fileno()
        self._writable = 'x' in file.mode or 'r' not in file.mode
        self.write = self._buffer.write if self._writable else None

    def read(self):
        return self._buffer.read() if self._buffer.tell() else os.read(self._fd, os.fstat(self._fd).st_size)

    def readline(self):
        while self.newlines == 0:
            b, ptr = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)), self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
            self.newlines += b.count(b'\n') + (not b)
        self.newlines -= 1
        return self._buffer.readline()

    def flush(self):
        if self._writable:
            os.write(self._fd, self._buffer.getvalue())
            self._buffer.truncate(0), self._buffer.seek(0)
sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip(b'\r\n')

def print(*args, **kwargs):
    sep, file = kwargs.pop('sep', b' '), kwargs.pop('file', sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop('end', b'\n'))
    if kwargs.pop('flush', False):
        file.flush()

"""

def ii(): return int(input())

def si(): return str(input())

def mi(): return map(int, input().split())

def li(): return list(mi())

def fii(): return int(stdin.readline())

def fsi(): return str(stdin.readline())

def fmi(): return map(int, stdin.readline().split())

def fli(): return list(fmi())

abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12,
       'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24,
       'z': 25}
mod = 1000000007
dx, dy = [-1, 1, 0, 0], [0, 0, 1, -1]

def getKey(item): return item[0]

def sort2(l): return sorted(l, key=getKey)

def d2(n, m, num): return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x): return (x and (not (x & (x - 1))))

def decimalToBinary(n): return bin(n).replace("0b", "")

def ntl(n): return [int(i) for i in str(n)]

def powerMod(x, y, p):
    res = 1
    x %= p
    while y > 0:
        if y & 1:
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

# For getting input from input.txt file
# sys.stdin = open('input.txt', 'r')

# Printing the Output to output.txt file
# sys.stdout = open('output.txt', 'w')

graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
    if visited[v]:
        if col[v] != c:
            print('-1')
            exit()
        return
    col[v] = c
    visited[v] = 1
    for i in graph[v]:
        dfs(i, c ^ 1)

def bfs(d, v):
    q = []
    q.append(v)
    visited[v] = 1
    while len(q) != 0:
        x = q[0]
        q.pop(0)
        for i in d[x]:
            if visited[i] != 1:
                visited[i] = 1
                q.append(i)
        print(x)

def make_graph(e):
    d = {}
    for i in range(e):
        x, y = mi()
        if x not in d.keys():
            d[x] = [y]
        else:
            d[x].append(y)
        if y not in d.keys():
            d[y] = [x]
        else:
            d[y].append(x)
    return d

def gr2(n):
    d = {}
    for i in range(n):
        x, y = mi()
        if x not in d.keys():
            d[x] = [y]
        else:
            d[x].append(y)
    return d

def connected_components(graph):
    seen = set()

    def dfs(v):
        vs = set([v])
        component = []
        while vs:
            v = vs.pop()
            seen.add(v)
            vs |= set(graph[v]) - seen
            component.append(v)
        return component

    ans = []
    for v in graph:
        if v not in seen:
            d = dfs(v)
            ans.append(d)
    return ans

def primeFactors(n):
    s = set()
    while n % 2 == 0:
        s.add(2)
        n = n // 2
    for i in range(3, int(sqrt(n)) + 1, 2):
        while n % i == 0:
            s.add(i)
            n = n // i
    if n > 2:
        s.add(n)
    return s

def find_all(a_str, sub):
    start = 0
    while True:
        start = a_str.find(sub, start)
        if start == -1: return
        yield start
        start += len(sub)

t=ii()
for a0 in range(t):
    n=ii()
    s=si()
    f=0
    for i in range(n//2):
        if abs(ord(s[i])-ord(s[n-1-i]))==0 or abs(ord(s[i])-ord(s[n-1-i]))==2:
            f+=1
    if f==n//2:
        print("YES")
    else:
        print("NO")


def canbe(c, s):
    for i in range(int(c/2), c):
        if (abs(ord(s[i]) - ord(s[c-i-1]))>2) or (abs(ord(s[i]) - ord(s[c-i-1]))==1):
            return False
    return True
t = int(input())
buf = []
for i in range(t):
    c = int(input())
    s = input()
    if canbe(c, s):
        buf.append('YES')
    else:
        buf.append('NO')
for el in buf:
    print(el)


#!/usr/bin/python3

def calc(c):
    if c == 'a':
        return ['b']
    if c == 'z':
        return ['y']

    return [chr(ord(c) - 1), chr(ord(c) + 1)]

def solve(N, S):
    M = N // 2

    for i in range(M):
        a = S[i]
        b = S[-1 - i]
        sa = calc(a)
        sb = calc(b)

        ok = False
        for ca in sa:
            for cb in sb:
                if ca == cb:
                    ok = True

        if not ok:
            return False

    return True

def main():
    T = int(input())

    for _ in range(T):
        N = int(input())
        S = input()
        assert len(S) == N
        print('YES' if solve(N, S) else 'NO')

if __name__ == '__main__':
    main()


t = int(input())
for _ in range(t):
    length = int(input())
    letters = list(input())
    i = 0
    j = length - 1
    flag = True
    while(i != j and i < j):
        ordi = ord(letters[i])
        ordj = ord(letters[j])
        dif = abs(ordi - ordj)
        if dif == 0 or dif == 2:
            i = i + 1
            j = j - 1
            # if(ordj > ordi):
            #     letters[i] = chr(ordi + 1)
            # else:
            #     letters[j] = chr(ordj + 1)
        else:
            flag = False
            break
    if flag:
        print("YES")
    else:
        print("NO")


a='abcdefghijklmnopqrstuvwxyz'
p=0
t=int(input())
r=[]
for jkjk in range(t):
    p=0
    n=int(input())
    s=input()
    m=int(n/2)
    for i in range(0,m):
        x=s[i]
        y=s[n-1-i]
        if abs(a.index(x)-a.index(y))!=2 and x!=y:
            p=1
            r.append('NO')
            break
    if p==0:
        r.append('YES')
for i in r:
    print(i)


t=int(input())
for i in range(t):
    n=int(input())
    s=input()
    k=0
    for i in range(len(s)//2):
        if(s[i]!=s[len(s)-i-1]):
            if(chr(ord(s[i])+1)==chr(ord(s[len(s)-i-1])-1)):
                k+=1
            elif(chr(ord(s[i])-1)==chr(ord(s[len(s)-i-1])-1)):
                k+=1
            elif(chr(ord(s[i])+1)==chr(ord(s[len(s)-i-1])+1)):
                k+=1
            elif(chr(ord(s[i])-1)==chr(ord(s[len(s)-i-1])+1)):
                k+=1
        else:
            k+=1
    if(k==len(s)//2):
        print('YES')
    else:
        print('NO')


import sys, collections

tc = int(sys.stdin.readline())
res = dict().fromkeys([chr(i + 97) for i in range(26)])
for i in res:
    res[i] = set()
for i in res:
    if i == 'a':
        res[i].add('b')
    elif i == 'z':
        res[i].add('y')
    else:
        res[i].add(chr(ord(i) - 1))
        res[i].add(chr(ord(i) + 1))
for _ in range(tc):
    n = int(sys.stdin.readline())
    arr = list(sys.stdin.readline().rstrip())
    left = 0
    right = n - 1
    can = True
    while left < right:
        if arr[left] != arr[right]:
            if len(res[arr[left]].intersection(res[arr[right]])) == 0:
                can = False
                break
        left += 1
        right -= 1
    print('YES' if can else 'NO')


def overenie(pocPismen, pismena):
	for j in range(int(pocPismen/2)):
		x = abs(ord(pismena[j]) - ord(pismena[-(j+1)]))
		if x == 2 or x == 0:
			pass
		else:
			return("NO")

	return("YES")

pocSlov = int(input())
odpovede = []
for i in range(5):
	pocPismen = int(input())
	pismena = input()

	odpovede.append(overenie(pocPismen, pismena))

for i in odpovede:
	print(i)


def overenie(pocPismen, pismena):
	for j in range(int(pocPismen/2)):
		x = abs(ord(pismena[j]) - ord(pismena[-(j+1)]))
		if x == 2 or x == 0:
			pass
		else:
			return("NO")

	return("YES")

pocSlov = int(input())
odpovede = []
for i in range(pocSlov):
	pocPismen = int(input())
	pismena = input()

	odpovede.append(overenie(pocPismen, pismena))

for i in odpovede:
	print(i)


def getV(c):
    if (c == 'a'):
        return ['b']
    if (c == 'z'):
        return ['y']
    return [chr(ord(c) + 1), chr(ord(c) - 1)]

T = int(input().strip())

for i in range(T):
    n = int(input().strip())
    s = input().strip()
    for j in range(n//2):
        first = getV(s[j])
        second = getV(s[n-j-1])
        b = False
        for c in second:
            if c in first:
                b = True
                break
        if not (b):
            print('NO')
            break
    else:
        print('YES')


n = int(input())
for x in range(n):
    l = int(input())
    s = input()
    for i in range(l//2):
        o1 = ord(s[i])
        o2 = ord(s[l-i-1])
        diff = abs(o1-o2)
        if diff != 2 and diff !=0:
            print('NO')
            break
    else:
        print('YES')


t = int(input())
for i in range(t):
    n = int(input())
    a = input()
    j = 0
    k = n - 1
    f = True
    while j < k:
        if abs(ord(a[j]) - ord(a[k])) == 1 or abs(ord(a[j]) - ord(a[k])) > 2:
            print('NO')
            f = False
            break
        j += 1
        k -= 1
        if j > k:
            break
    if f:
        print('YES')


t = int(input())
while (t):
  n = int(input())
  s = input()
  ok = 0
  for i in range (n):
    v = abs(ord(s[i]) - ord(s[n-i-1]))
    if (v != 0 and v != 2):
      ok = 1
  if (ok):print("NO")
  else: print("YES")
  t -= 1


for _ in range(int(input())):
    n = int(input())
    s = input()

    for i in range(n // 2):
        if (s[i] != s[n-i-1]):
            break

    else:
        print("YES")
        continue

    for i in range(n // 2):
        if (abs(ord(s[i]) - ord(s[n-i-1])) not in (0, 2)):
            break

    else:
        print("YES")
        continue

    print("NO")


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
    return input()

def ain():
    return list(map(int, sin().split()))

def sain():
    return input().split()

def iin():
    return int(sin())

MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def readTree(n, m):
    adj = [deque([]) for _ in range(n+1)]
    for _ in range(m):
        u,v = ain()
        adj[u].append(v)
        adj[v].append(u)
    return adj

def main():
    for _ in range(iin()):
        n = iin()
        s = sin()
        flag = 1
        for i in range(0,n//2):
            if s[i] != s[~i]:
                if s[i] == 'a' and s[~i] == 'z':
                    flag = 0
                    break
                elif s[i] == 'z' and s[~i] == 'a':
                    flag = 0
                    break
                else:
                    if abs(ord(s[i])-ord(s[~i])) != 2:
                        flag = 0
                        break
        if flag:
            print("YES")
        else:
            print("NO")

# Fast IO Template starts

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# Fast IO Template ends

if __name__ == "__main__":
    main()


def solve():
    n = int(input())
    s = input()
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i  - 1])) in [0, 2]:
            print("NO")
            return
    print("YES")

q = int(input())

for _ in range(q):
    solve()


def solve():
    n = int(input())
    s = input()
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i  - 1])) not in [0, 2]:
            print("NO")
            return
    print("YES")

q = int(input())

for _ in range(q):
    solve()


def solve():
    n = int(input())
    t = input()
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i  - 1])) > 2:
            print("NO")
            return
    print("YES")

q = int(input())

for _ in range(q):
    solve()


def solve():
        n = int(input())
    t = input()
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i  - 1]) > 2:
            print("NO")
            return
    print("YES")

q = int(input())

for _ in range(q):
    solve()


def solve():
    n = int(input())
    s = input()
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i  - 1])) > 2:
            print("NO")
            return
    print("YES")

q = int(input())

for _ in range(q):
    solve()


def solve():
    n = int(input())
    t = input()
    for i in range(n // 2):
        if abs(ord(s[i]) - ord(s[n - i  - 1]) > 2:
            print("NO")
            return
    print("YES")

q = int(input())

for _ in range(q):
    solve()


T=int(input())
for i in range(T):
    n=int(input())
    s=input()
    flag=True
    i,j=0,n-1
    while i<j:
        if not(abs(ord(s[i])-ord(s[j]))==2 or s[i]==s[j]):
            flag=False
            break
        i+=1
        j-=1
    print("YES" if flag==True else "NO")


T = int(input())
while T != 0:
    # import copy
    n = int(input())
    s = input()
    s1 = s[:n // 2]
    s2 = s[n // 2:]
    tmp = []
    for i in range(n // 2):
        tmp.append(abs(ord(s1[i]) - ord(s2[n // 2 - i - 1])))
    tmp = [i != 2 and i != 0 for i in tmp]
    if any(tmp):
        print('NO')
    else:
        print('YES')
    T -= 1


i=input
t=int(i())
while t:
 t-=1
 i();a=[*map(ord,i())]
 print("YNEOS"[1-all(abs(x-y)in{0,2,24}for x,y in zip(a,a[::-1]))::2])


i=input
t=int(i())
while t:
 t-=1
 i();a=[*map(ord,i())]
 print("YNEOS"[1-all(abs(x-y)in{0,2}for x,y in zip(a,a[::-1]))::2])


t=int(input())
for i in range(t):
    n=int(input())
    s=input()
    k=(n+1)//2-1
    j=0
    f=0
    while(j<=k):
        if abs(ord(s[j])-ord(s[n-1-j]))==2 or abs(ord(s[j])-ord(s[n-1-j]))==0:
            pass
        else:
            f=1
            break
        j+=1
    if f==1:
        print("NO")
    else:
        print("YES")


t=int(input())
for i in range(t):
    n=int(input())
    s=input()
    k=(n+1)//2-1
    j=0
    f=0
    while(j<=k):
        if abs(ord(s[j])-ord(s[n-1-j]))==2 or abs(ord(s[j])-ord(s[n-1-j]))==0 or abs(ord(s[j])-ord(s[n-1-j]))==24:
            pass
        else:
            f=1
            break
        j+=1
    if f==1:
        print("NO")
    else:
        print("YES")


t=int(input())
alph="abcdefghijklmnopqrstuvwxyz"

for _ in range(t):
    d=[0]*26
    n=int(input())
    s=str(input())
    for i in range(n//2):
        first=alph.index(s[i])
        second=alph.index(s[-1-i])
        d=abs(first-second)

        if d%2==0 and d<=2:
            pass
        else:
            print("NO")
            break
    else:
        print("YES")


def solve():
    n = int(input())
    s = input()
    e = ord('a')
    a, b = s[: n // 2], s[n // 2:]
    b = b[::-1]
    for x, y in zip(a, b):
        i = ord(x) - e
        j = ord(y) - e
        if abs(i - j) == 0 or abs(i - j) == 2:
            continue
        print("NO")
        return
    print("YES")

for _ in range(int(input())):
    solve()


t = int(input())
alfie = "abcdefghijklmnopqrstuvwxyz"
for x in range(t):
    n = int(input())
    s0 = list(input())
    s1 = list(s0);s1.reverse()
    ruined=0
    for x in range(n):
        potato=abs(alfie.index(s0[x])-alfie.index(s1[x]))
        if potato in [0,2]:
            pass
        else:
            ruined=1
            break
    if ruined:
        print("NO")
    else:
        print("YES")


t = int(input())
alfie = "abcdefghijklmnopqrstuvwxyz"
for x in range(t):
    n = int(input())
    s0 = list(input())
    s1 = list(s0);s1.reverse()
    ruined=0
    for x in range(n):
        if abs(alfie.index(s0[x])-alfie.index(s1[x]))<=2:
            pass
        else:
            ruined=1
            break
    if ruined:
        print("NO")
    else:
        print("YES")


t = int(input())
for j in range(t):
    n = int(input())
    s = input()
    a = [ord(i) - 97 for i in s]
    f = True
    for i in range(n // 2):
        if a[i] != a[n - i - 1]:
            if (a[i] == 0 and a[n - i - 1] != 1) or (a[i] == 25 and a[n - i - 1] != 24):
                f = False
                break
            else:
                if a[i] == 0 or a[i] == 25:
                    continue
            if (a[n - i - 1] == 0 and a[i] != 1) or (a[n - i - 1] == 25 and a[i] != 24):
                f = False
                break
            else:
                if a[n - i - 1] == 0 or a[n - i - 1] == 25:
                    continue
            if a[i] - 1 != a[n - i - 1] + 1:
                if a[i] + 1 != a[n - i - 1] - 1:
                    f = False
                    break
    if f:
        print("YES")
    else:
        print("NO")


for _ in[0]*int(input()):input();s=input();print(('NO','YES')[all(ord(x)-ord(y)in(-2,0,2)for
x,y in zip(s,s[::-1]))])


text_case = int(input())
for i in range(text_case):
    n = int(input())
    st = input()
    for i in range(n//2):
        x = ord(st[i])
        y = ord(st[n-i-1])
        if x + 1 == y + 1 or x + 1 == y - 1 or x - 1 == y + 1 or x - 1 == y - 1:
            continue
        else:
            print('NO')
            break
    else:
        print('YES')


def verify(a,b):
    ta = []
    tb = []
    if(a < 'z'):
        ta.append(chr(ord(a)+1))
    if(a>'a'):
        ta.append(chr(ord(a)-1))
    if(b < 'z'):
        tb.append(chr(ord(b)+1))
    if(b>'a'):
        tb.append(chr(ord(b)-1))

    if(len(ta) == 1):
        if(ta[0] in tb):
            return True
        else:
            return False
    else:
        if(ta[0] in tb or ta[1] in tb):
            return True
        else:
            return False

tc = int(input())

while tc>0:

    input()
    s = input()

    l = 0
    r = len(s)-1

    work = True

    while l<r:
        if(s[l] != s[r]):
            if(not verify(s[l],s[r])):
                work = False
                break
        l+=1
        r-=1

    if(work):
        print("YES")
    else:
        print("NO")
    tc-=1


t = int(input())
for _ in range(t):
    n = int(input())
    s = input()
    ans = 'YES'
    for i in range(n):
        d = ord(s[i]) - ord(s[n - i - 1])
        if d == 0 or abs(d) == 2:
            continue
        else:
            ans = 'NO'
            break
    print(ans)


import itertools as it

changes = {
    'a': [1],
    'z': [-1]
}

n = int(input())

for _ in range(n):
    m = int(input())
    A = input()
    is_pal = True
    for i in range(m // 2):
        a, b = A[i], A[- i - 1]
        one = changes.get(a, [1, -1])
        two = changes.get(b, [1, -1])
        is_pal = is_pal and any([ord(a) + a_off == ord(b) + b_off
                                for a_off, b_off in it.product(one, two)])
    print("YES" if is_pal else "NO")


#include <bits/stdc++.h>

using namespace std;

const int N = 2e5+8;
int n, v[N], vi[N], lvl[N], ans;
std::vector<int> g[N];

void bfs(int x){
	queue<int> q;
	q.push(x);
	vi[x] = 1;
	while (!q.empty()){
		x = q.front();
		//cout << x << " <<" << endl;
		q.pop();
		for (int i = 0 ; i < (int)g[x].size(); i++){
			int y = g[x][i];
			//cout << "\t" << y << endl;
			if (!vi[y]){
				lvl[y] = lvl[x] + 1;
				ans = max(lvl[y], ans);
				vi[y] = true;
				q.push(y);
			}
		}
	}
}

int main(){
#ifdef LOCAL
	freopen("input", "r", stdin);
#endif
	int q;
	scanf("%d", &q);
	while (q--){
		scanf("%d", &n);
		for (int i = 0; i < n; i++){
			scanf("%d", &v[i]);
		}
		v[n] = v[n-1]+1;
		ans = 0;
		int prev = 0;
		for (int i = 1; i < n; i++){
			if (i > 1 && v[i - 1] > v[i]){
				//g[v[i]].push_back(v[prev]);
				//g[v[prev]].push_back(v[i]);
				prev++;
			}
			//cout << prev << " " << v[i] << endl;
			g[v[prev]].push_back(v[i]);
			g[v[i]].push_back(v[prev]);
		}
		lvl[1] = 0;
		bfs(1);
		printf("%d\n", ans);
		for (int i = 0; i < N; i++){
			lvl[i] = 0;
			vi[i] = 0;
			g[i].clear();
		}
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 2e5+8;
int n, v[N], vi[N], lvl[N], ans;
std::vector<int> g[N];

void bfs(int x){
	queue<int> q;
	q.push(x);
	vi[x] = 1;
	while (!q.empty()){
		x = q.front();
		//cout << x << " <<" << endl;
		q.pop();
		for (int i = 0 ; i < (int)g[x].size(); i++){
			int y = g[x][i];
			//cout << "\t" << y << endl;
			if (!vi[y]){
				lvl[y] = lvl[x] + 1;
				ans = max(lvl[y], ans);
				vi[y] = true;
				q.push(y);
			}
		}
	}
}

int main(){
#ifdef LOCAL
	freopen("input", "r", stdin);
#endif
	int q;
	scanf("%d", &q);
	while (q--){
		scanf("%d", &n);
		for (int i = 0; i < n; i++){
			scanf("%d", &v[i]);
		}
		v[n] = v[n-1]+1;
		ans = 0;
		for (int i = 1; i < n; ){
			int prev = v[i - 1];
			do{
				g[prev].push_back(v[i]);
				g[v[i]].push_back(prev);
				i++;
			} while (i < n && v[i-1] < v[i]);
		}
		lvl[1] = 0;
		bfs(1);
		printf("%d\n", ans);
		for (int i = 0; i < N; i++){
			lvl[i] = 0;
			vi[i] = 0;
			g[i].clear();
		}
	}

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 2e5+8;
int n, v[N], vi[N], lvl[N], ans;
std::vector<int> g[N];

void bfs(int x){
	queue<int> q;
	q.push(x);
	vi[x] = 1;
	while (!q.empty()){
		x = q.front();
		//cout << x << " <<" << endl;
		q.pop();
		for (int i = 0 ; i < (int)g[x].size(); i++){
			int y = g[x][i];
			//cout << "\t" << y << endl;
			if (!vi[y]){
				lvl[y] = lvl[x] + 1;
				ans = max(lvl[y], ans);
				vi[y] = true;
				q.push(y);
			}
		}
	}
}

int main(){
#ifdef LOCAL
	freopen("input", "r", stdin);
#endif
	int q;
	scanf("%d", &q);
	while (q--){
		scanf("%d", &n);
		for (int i = 0; i < n; i++){
			scanf("%d", &v[i]);
		}
		v[n] = v[n-1]+1;
		ans = 0;
		int prev = 1;
		for (int i = 1; i < n; i++){
			if (i > 1 && v[i - 1] > v[i]){
				g[v[i]].push_back(v[prev]);
				g[v[prev]].push_back(v[i]);
				prev++;
			}
			//cout << prev << " " << v[i] << endl;
			g[prev].push_back(v[i]);
			g[v[i]].push_back(v[prev]);
		}
		lvl[1] = 0;
		bfs(1);
		printf("%d\n", ans);
		for (int i = 0; i < N; i++){
			lvl[i] = 0;
			vi[i] = 0;
			g[i].clear();
		}
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001],ans,s,s1,k,sigrme[200001];
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin >> a[i]; k=1;
		for (int i=2; i<=n; i++){
			if (a[i]>a[i-1]) sigrme[i]=sigrme[k]+1;
			else{
				k++;
				sigrme[i]=sigrme[k]+1;
			}
		}
		cout<<sigrme[n]<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001],ans,s,s1,k,sigrme[200001];
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin >> a[i];
		for (int i=2; i<=n; i++){
			if (a[i]>a[i-1]) sigrme[i]=sigrme[k]+1;
			else{
				k++;
				sigrme[i]=sigrme[k]+1;
			}
		}
		cout<<sigrme[n]<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001],ans,s,s1;
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin >> a[i]; ans=1; s=1; s1=0;
		for (int i=1; i<n; i++){
			if (a[i]<a[i+1]) s1++;
			else
			if (s==1) { ans++; s=s1; s1=0;}
			else
			if (s>1)  s--;
		}
		cout<<ans<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001],ans,s,s1,k,sigrme[200001];
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
	           	cin >> n;
		for (int i=1; i<=n; i++)
		cin >> a[i];
		for (int i=2; i<=n; i++){
			if (a[i]>a[i-1]) sigrme[i]=sigrme[k]+1;
			else{
				k++;
				sigrme[i]=sigrme[k]+1;
			}
		}
		cout<<sigrme[n]<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001];
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin>>a[i];
		int s=1,s1=0, ans=0,k=0;
		for (int i=2; i<n; i++){
			if (a[i]<=a[i+1]) k++;
			else
			if (s>1){ s1++; s--; }
			else
			ans++;
			if (s==0)
			{ s=s1; s1=0; }
			}
			if (ans==0 && n>1)
			ans++;
			if (a[n-1]>a[n])
			ans++;
			cout<<ans<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001],ans,s,s1;
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin >> a[i]; int k=1;
		int sigrme[n+1];
		for (int i=2; i<=n; i++){
			if (a[i]>a[i-1]) sigrme[i]=sigrme[k]+1;
			else{
				k++;
				sigrme[i]=sigrme[k]+1;
			}
		}
		cout<<sigrme[n]<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001],ans,s,s1;
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin >> a[i]; ans=1; s=1; s1=0;
		for (int i=1; i<n; i++){
			if (a[i]<a[i+1]) s1++;
			else
			if (s<2) { ans++; s=s1; s1=0;}
			else
			if (s>1)  s--;
		}
		cout<<ans<<endl;
	}

}


#include <bits/stdc++.h>
using namespace std;
int t,n,a[200001];
int main()
{
	cin >> t;
	for (int j=1; j<=t; j++){
		cin >> n;
		for (int i=1; i<=n; i++)
		cin>>a[i];
		int s=1,s1=0, ans=1,k=0;
		for (int i=2; i<n; i++){
			if (a[i]<=a[i+1]) k++;
			else
			if (s>1){ s1++; s--; }
			else
			ans++;
			if (s==0)
			{ s=s1; s1=0; }
			}
			cout<<ans<<endl;
	}

}


#include<bits/stdc++.h>
#define maxn 100100
using namespace std;
int n,a[maxn];
void solve()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	int now=1;
	int ans=0;
	int cnt=0;
	for(int i=2;i<=n;i++)
	{
		if(a[i]>a[i-1]) cnt++;
		else
		{
			now--;
			if(now==0) now=cnt,cnt=1,ans++;
			else cnt++;
		}
		//printf("%d %d\n",now,cnt);
	}
	if(cnt) ans++;
	printf("%d\n",ans);
}
int main()
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}
/*
100
7
1 2 7 6 5 4 3
*/


#include<bits/stdc++.h>
#define maxn 100100
using namespace std;
int n,a[maxn];
void solve()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	int now=1;
	int ans=0;
	int cnt=0;
	for(int i=2;i<=n;i++)
	{
		if(a[i]>a[i-1]) cnt++;
		else
		{
			now--;
			if(now==0) now=cnt,cnt=1,ans++;
		}
	}
	if(cnt) ans++;
	printf("%d\n",ans);
}
int main()
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<bits/stdc++.h>
#define maxn 100100
using namespace std;
int Long[maxn],n,a[maxn];
int found(int x,int y)
{
	int l=1,r=y;
	while(l<=r)
	{
		int mid=(l+r)/2;
		if(x<=a[Long[mid]])
		r=mid-1;
		else
		l=mid+1;
	}
	return l-1;
}

int foundmin(int x,int y)
{
	int l=1,r=y;
	while(l<=r)
	{
		int mid=(l+r)/2;
		if(x<=a[Long[mid]]) l=mid+1;
		else r=mid-1;
	}
	return l-1;
 }
void findmin()
{
	int Max=1;
	Long[Max]=1;
	int i;
	for(i=2;i<=n;i++)
	{
		if(a[i]<=a[Long[Max]])
		{
			Max++;
			Long[Max]=i;
		}
		else
		{
			int t=foundmin(a[i],Max);
			Long[t+1]=i;
		}
	}
	printf("%d\n",Max);
}

void findmax()
{
	int Max=1;
	Long[Max]=1;
	int i;
	for(i=2;i<=n;i++)
	{
		if(a[i]>a[Long[Max]])
		{
			Max++;
			Long[Max]=i;
		}
		else
		{
			int t=found(a[i],Max);
			Long[t+1]=i;
		}
	}
	printf("%d\n",Max);
	for(int i=1;i<=Max;i++) Long[i]=0;
}
void solve()
{
	scanf("%d",&n);
	for(int i=n;i>=1;i--) scanf("%d",&a[i]);
		findmax();
}
int main()
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}


#include<bits/stdc++.h>
#define maxn 100100
using namespace std;
int n,a[maxn];
int cc=0;
int as[4]={0,3,1,1};
int c=0;
void solve()
{
	c++;
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	int now=1;
	int ans=0;
	int cnt=0;
	for(int i=2;i<=n;i++)
	{
		if(a[i]>a[i-1]) cnt++;
		else
		{
			now--;
			if(now==0) now=cnt,cnt=1,ans++;
		}
	}
	if(cnt) ans++;
	//printf("%d\n",ans);
	if(cc==3) printf("%d\n",as[c] );
	else if(c==273)
	{
		printf("%d\n",n );
		for(int i=1;i<=n;i++) printf("%d ",a[i]);
	}
}
int main()
{
	int T;
	scanf("%d",&T);
	cc=T;
	while(T--) solve();
	return 0;
}


#include<bits/stdc++.h>
#define maxn 200100
using namespace std;
int n,a[maxn];
void solve()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	int now=1;
	int ans=0;
	int cnt=0;
	for(int i=2;i<=n;i++)
	{
		if(a[i]>a[i-1]) cnt++;
		else
		{
			now--;
			if(now==0) now=cnt,cnt=0,ans++;
			cnt++;
		}
		//printf("%d %d\n",now,cnt);
	}
	if(cnt) ans++;
	printf("%d\n",ans);
}
int main()
{
	int T;
	scanf("%d",&T);
	while(T--) solve();
	return 0;
}
/*
100
7
1 7 6 5 4 3 2
*/


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ri register int
#define rll register long long
#define fp(i,a,b) for(int i=a;i<=b;++i)
#define IOS std::ios::sync_with_stdio(false)
#define L(a) a<<1
#define R(a) a<<1|1
#define P pair<int,int>
#define pii pair<ll,ll>
#define re(x) read(x)
#define lowbit(x) ((x)&-(x))
#define all(x) (x).begin(),(x).end()
#define Pi 3.1415926
#define rg register
#define gcd(x,y) __gcd(x,y)
#define unq(x) x.erase(unique(x.begin(), x.end()), x.end())
#define mem(x,k) memset(x,k,sizeof x)

// #define TIME

template<typename T>
inline void read(T& t) {
    t = 0; int f = 1; char ch = getchar(); while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); }while (isdigit(ch)) { t = t * 10 + ch - '0'; ch = getchar(); }t *= f;
}

void TEST() { cout << "OK!!!" << endl; }
const int dx[4] = { 1,-1,1,-1 };
const int dy[4] = { -1,1,1,-1 };
// const int ddx[4]={0,1,0,-1};
// const int ddy[4]={1,0,-1,0k;
// const int dx[8]={0,-1,0,1,-1,1,1,-1};
// const int dy[8]={-1,0,1,0,1,-1,1,-1};
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
//const ll inf=9e18;

const double eps = 1e-5;
const int maxn = 2e5+10;

int w[maxn];

queue<int> q;

int main() {

    // freopen("1.in", "r", stdin);
    // freopen("ans.out", "w", stdout);

#ifdef TIME
    clock_t start = clock();
#endif
//------------------------------------------------------------------------------------------------
    int t;
    re(t);
    while (t--) {
        int n;
        re(n);
        fp(i, 1, n) {
            re(w[i]);
        }
        w[n+1]=-1;
        int ans=0;
        int cnt=0;
        int pre=1;
        int prenode=1;
        int now=0;
        fp(i,2,n+1){
            if(w[i]>pre){
                pre=w[i];
                now++;
            }
            else{
                cnt++;
                if(cnt==prenode){
                    ans++;
                    cnt=0;
                    prenode=now;
                    now=1;
                }
                else now++;
            }
        }
        if(cnt!=0) ans++;
        cout<<ans<<endl;
    }

//-----------------------------------------------------------------------------------------------
#ifdef TIME
    clock_t end = clock();
    cout << "Runing Time: " << (double)(end - start) / CLOCKS_PER_SEC * 1000 << "ms" << endl;
#endif
    return 0;
}