/*
 Author: Togrul Gasimov
 Mail: ttogrul30@gmail.com
 */

import java.util.Collection;
import java.util.Comparator;
import java.util.Locale;
import java.util.Scanner;
import java.util.Vector;
import java.util.Arrays;
import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.List;
import java.util.Stack;

import javax.print.attribute.IntegerSyntax;

public class Main {

static boolean simple(int n){
	boolean p=true;

	for(int i=2;i<=(int)Math.sqrt(n);i++){
		if(n%i==0){
			p=false; break;
		}
	}
	return p;
}
static boolean g(int n){
	int f=0;
	boolean p=false;
	for(int i=2;i<=n;i++){
		if(n%i==0 && simple(i)){
			f++; if(f==2){
				p=true; break;
			}
		}
	}
return p;
}

static double u(double x1,double y1,double x2,double y2){
return Math.sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)  );
}
static int gcd(int a,int b){
	if(b==0)return a;
	else return gcd(b,a%b);
}

static Scanner scan = new Scanner(System.in);
//variables begin
//static double PI=3.1415926535897932384626433832795,E=1e-9;
static int n;
static int[] a = new int[100000];

//variables end
static void read(){
 n=scan.nextInt();
 for(int i=1;i<=n;i++)a[i]=scan.nextInt();
}
static void solve(){
	int min=a[1],index=1;

	for(int i=1;i<=n;i++){
		if(a[i]<min){
			min=a[i]; index=i;
		}
	}

	for(int i=1;i<=n;i++){
		if(index!=i && a[i]==min){
			System.out.println("Still Rozdil"); System.exit(0);
		}
	}

	System.out.println(index);

}

public static void main(String[] args) {

  read();
  solve();

}
}


 //  package main;
 import java.io.*;
import java.math.*;
import   java.util.*;;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Niyaz Nigmatullin
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner scan = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, scan, out);
        out.close();
    }
 }

class TaskD {

    public void solve(int testNumber, FastScanner scan, FastPrinter out) {
        int ans = 0;
         int n = scan.nextInt(), index = 1, m = 110;

         int[]a = new int[1000001];
         for(int i = 1 ; i <= n; i++){
             a[i] = scan.nextInt();
             if(a[i] < m){
                 index = i; m = a[i];
             }
         }
         int k = 0;
         for(int i = 1 ; i <= n; i++){
             if(a[i] == a[index]) k++;
         }

         if( k == 1)
         out.println(index );
         else {
             out.println("Still Rozdil");
         }

        }
    }

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    public String next() {
        StringBuilder sb = new StringBuilder();
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        if (c < 0) {
            return null;
        }
        while (c >= 0 && !isWhiteSpace(c)) {
            sb.appendCodePoint(c);
            c = read();
        }
        return sb.toString();
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

 }


 //  package main;
 import java.io.*;
import java.math.*;
import   java.util.*;;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Niyaz Nigmatullin
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner scan = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, scan, out);
        out.close();
    }
 }

class TaskD {

    public void solve(int testNumber, FastScanner scan, FastPrinter out) {
        int ans = 0;
         int n = scan.nextInt(), index = 1, m = Integer.MAX_VALUE;

         int[]a = new int[1000001];
         for(int i = 1 ; i <= n; i++){
             a[i] = scan.nextInt();
             if(a[i] < m){
                 index = i; m = a[i];
             }
         }
         int k = 0;
         for(int i = 1 ; i <= n; i++){
             if(a[i] == a[index]) k++;
         }

         if( k == 1)
         out.println(index );
         else {
             out.println("Still Rozdil");
         }

        }
    }

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    public String next() {
        StringBuilder sb = new StringBuilder();
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        if (c < 0) {
            return null;
        }
        while (c >= 0 && !isWhiteSpace(c)) {
            sb.appendCodePoint(c);
            c = read();
        }
        return sb.toString();
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

 }


/*
 Author: Togrul Gasimov
 Mail: ttogrul30@gmail.com
 */

import java.util.Collection;
import java.util.Comparator;
import java.util.Locale;
import java.util.Scanner;
import java.util.Vector;
import java.util.Arrays;
import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.List;
import java.util.Stack;

import javax.print.attribute.IntegerSyntax;

public class Main {

static boolean simple(int n){
	boolean p=true;

	for(int i=2;i<=(int)Math.sqrt(n);i++){
		if(n%i==0){
			p=false; break;
		}
	}
	return p;
}
static boolean g(int n){
	int f=0;
	boolean p=false;
	for(int i=2;i<=n;i++){
		if(n%i==0 && simple(i)){
			f++; if(f==2){
				p=true; break;
			}
		}
	}
return p;
}

static double u(double x1,double y1,double x2,double y2){
return Math.sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)  );
}
static int gcd(int a,int b){
	if(b==0)return a;
	else return gcd(b,a%b);
}

static Scanner scan = new Scanner(System.in);
//variables begin
//static double PI=3.1415926535897932384626433832795,E=1e-9;
static int n;
static int[] a = new int[100001];

//variables end
static void read(){
 n=scan.nextInt();
 for(int i=1;i<=n;i++)a[i]=scan.nextInt();
}
static void solve(){
	int min=a[1],index=1;

	for(int i=1;i<=n;i++){
		if(a[i]<min){
			min=a[i]; index=i;
		}
	}

	for(int i=1;i<=n;i++){
		if(index!=i && a[i]==min){
			System.out.println("Still Rozdil"); System.exit(0);
		}
	}

	System.out.println(index);

}

public static void main(String[] args) {

  read();
  solve();

}
}


import java.util.*;
public class Rozdil
{
    static final int INF = Integer.MAX_VALUE;
    static final int NINF = Integer.MIN_VALUE;
    public static void exit()
    {
        System.exit(0);
    }
    public static void main(String[]args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] arr = new int[1000000001];
        for(int i = 0; i < n; i++)
            arr[sc.nextInt()-1]++;

        for(int i = 0; i <= 1000000000; i++)
            if(arr[i]==1)
            {
                System.out.println(i+1);
                exit();
            } else if(arr[i] > 1)
            {
                System.out.println("Still Rozdil");
                exit();
            }
    }
}


import java.util.*;
public class Rozdil
{
    static final int INF = Integer.MAX_VALUE;
    static final int NINF = Integer.MIN_VALUE;
    public static void exit()
    {
        System.exit(0);
    }
    public static void main(String[]args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] arr = new int[n];
        int [] sorted = new int[n];
        for(int i = 0; i < n; i++)
        {
            arr[i] = sc.nextInt();
            sorted[i] = arr[i];
        }

        Arrays.sort(sorted);
        if(n > 1 && sorted[0] == sorted[1])
        {
            System.out.println("Still Rozdil");
            exit();
        }

        for(int i = 0; i < n; i++)
            if(arr[i] == sorted[0])
            {
                System.out.println(i+1);
                exit();
            }
    }
}


import java.util.*;
public class Rozdil
{
    static final int INF = Integer.MAX_VALUE;
    static final int NINF = Integer.MIN_VALUE;
    public static void exit()
    {
        System.exit(0);
    }
    public static void main(String[]args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] arr = new int[n];
        int [] sorted = new int[n];
        for(int i = 0; i < n; i++)
        {
            arr[i] = sc.nextInt();
            sorted[i] = arr[i];
        }

        Arrays.sort(sorted);
        if(sorted[0] == sorted[1])
        {
            System.out.println("Still Rozdil");
            exit();
        }

        for(int i = 0; i < n; i++)
            if(arr[i] == sorted[0])
            {
                System.out.println(i+1);
                exit();
            }
    }
}


import java.util.*;
public class Rozdil
{
    static final int INF = Integer.MAX_VALUE;
    static final int NINF = Integer.MIN_VALUE;
    public static void exit()
    {
        System.exit(0);
    }
    public static void main(String[]args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int i = 0;
        int min = INF;
        int c = 1;
        while(c <= n)
        {
            int x = sc.nextInt();
            if(x < min)
            {
                min = x;
                i = c;
            }else if(x == min)
            {
                System.out.println("Still Rozdil");
                exit();
            }
            c++;
        }

        System.out.println(i);
    }
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Hoang
 */
import java.io.*;
import java.util.*;

public class Main {

    private static BufferedReader reader;
    private static PrintWriter out;
    private static StringTokenizer tokenizer;
    //private final static String filename = "filename";

    private static void init(InputStream input, OutputStream output) throws IOException {
        reader = new BufferedReader(new InputStreamReader(input));
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(output)));
        //reader = new BufferedReader(new FileReader(filename + ".in"));
        //out = new BufferedWriter(new FileWriter(filename + ".out"));
        tokenizer = new StringTokenizer("");
    }

    private static String nextLine() throws IOException {
        return reader.readLine();
    }

    private static String next() throws IOException {
        while (!tokenizer.hasMoreTokens())
            tokenizer = new StringTokenizer(nextLine());
        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    private static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    private static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        init(System.in, System.out);
        int n = nextInt();
        //long startTime = System.currentTimeMillis();
        int[] s = new int[n];
        int min = 1000000000;
        int minIndex = -1;
        for (int i = 0; i < n; i++) {
            s[i] = nextInt();
            if (s[i] < min) {
                minIndex = i;
                min = s[i];
            }
        }
        boolean hasSame = false;
        for (int i = 0; i < n; i++)
            if (s[i] == min && i != minIndex) {
                hasSame = true;
                break;
            }
        if (hasSame)
            out.println("Still Rozdil");
        else
            out.println(minIndex + 1);
        //long runTime = System.currentTimeMillis() - startTime;
        //out.write(runTime + "\n");
        out.close();
        System.exit(0);
    }
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Hoang
 */
import java.io.*;
import java.util.*;

public class Main {

    private static BufferedReader reader;
    private static PrintWriter out;
    private static StringTokenizer tokenizer;
    //private final static String filename = "filename";

    private static void init(InputStream input, OutputStream output) throws IOException {
        reader = new BufferedReader(new InputStreamReader(input));
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(output)));
        //reader = new BufferedReader(new FileReader(filename + ".in"));
        //out = new BufferedWriter(new FileWriter(filename + ".out"));
        tokenizer = new StringTokenizer("");
    }

    private static String nextLine() throws IOException {
        return reader.readLine();
    }

    private static String next() throws IOException {
        while (!tokenizer.hasMoreTokens())
            tokenizer = new StringTokenizer(nextLine());
        return tokenizer.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    private static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    private static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        init(System.in, System.out);
        int n = nextInt();
        //long startTime = System.currentTimeMillis();
        int[] s = new int[n];
        int min = 1000000001;
        int minIndex = -1;
        for (int i = 0; i < n; i++) {
            s[i] = nextInt();
            if (s[i] < min) {
                minIndex = i;
                min = s[i];
            }
        }
        boolean hasSame = false;
        for (int i = 0; i < n; i++)
            if (s[i] == min && i != minIndex) {
                hasSame = true;
                break;
            }
        if (hasSame)
            out.println("Still Rozdil");
        else
            out.println(minIndex + 1);
        //long runTime = System.currentTimeMillis() - startTime;
        //out.write(runTime + "\n");
        out.close();
        System.exit(0);
    }
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package algorithm;

import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuffer buffer = new StringBuffer();
        String s = reader.readLine();
        int n = Integer.valueOf(s);
        String[] ss = reader.readLine().split(" ");
        int[] a = new int[ss.length];
        for(int i = 0; i < a.length; i++){
            a[i] = Integer.valueOf(ss[i]);
        }
        int ans = 0, amount = 1;
        for(int i = 1; i < a.length; i++){
            if(a[i] < a[ans]) {ans = i; amount = 1;}
            else if(a[i] == a[ans]) amount++;
        }

        if(amount == 1) System.out.println(ans + 1);
        else System.out.print("Still Rozdil");
    }
}


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package algorithm;

import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuffer buffer = new StringBuffer();
        String s = reader.readLine();
        int n = Integer.valueOf(s);
        String[] ss = reader.readLine().split(" ");
        int[] a = new int[ss.length];
        for(int i = 0; i < a.length; i++){
            a[i] = Integer.valueOf(ss[i]);
        }
        int ans = 0, amount = 1;
        for(int i = 1; i < a.length; i++){
            if(a[i] < a[ans]) {ans = i; amount = 1;}
            else if(a[i] == a[ans]) amount++;
        }

        if(amount == 1) System.out.println(ans + 1);
        else System.out.print("Still Rozdil");
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class LittleElephantandRozdil {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int [] t = new int [n];
        /*System.out.println("Enter integer separated by spaces: ");
        String input = sc.next();
        String[] numberString = input.split("\\s+");
        for (int i = 0; i < numberString.length; i++) {

            t[i]=Integer.parseInt(numberString[i]);
        }*/

          // Arrays.sort(t);
for (int i = 0; i < n; i++) {
    t[i]=sc.nextInt();

}
Arrays.sort(t);
if(t[0]==t[1]) System.out.println("Still Rozdil");
else System.out.println(t[0]);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class LittleElephantandRozdil {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] t = new int[n];
        /*
         * System.out.println("Enter integer separated by spaces: "); String
         * input = sc.next(); String[] numberString = input.split("\\s+"); for
         * (int i = 0; i < numberString.length; i++) {
         *
         * t[i]=Integer.parseInt(numberString[i]); }
         */
        t[0] = sc.nextInt();
        int m = t[0];
        int indic = 0;
        boolean b=false;
        for (int i = 1; i < n; i++) {
            t[i] = sc.nextInt();
            if (m > t[i]) {
                m = t[i];
                indic = i;
                b=false;
            }
            else if(m==t[i])
                b=true;

        }
if(b)System.out.println("Still Rozdil");
else System.out.println(indic+1);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class LittleElephantandRozdil {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] t = new int[n];
        /*
         * System.out.println("Enter integer separated by spaces: "); String
         * input = sc.next(); String[] numberString = input.split("\\s+"); for
         * (int i = 0; i < numberString.length; i++) {
         *
         * t[i]=Integer.parseInt(numberString[i]); }
         */
        t[0] = sc.nextInt();
        int m = t[0];
        int indic = 1;
        boolean b=false;
        for (int i = 1; i < n; i++) {
            t[i] = sc.nextInt();
            if (m > t[i]) {
                m = t[i];
                indic = i;
                b=false;
            }
            else if(m==t[i])
                b=true;

        }
if(b)System.out.println("Still Rozdil");
else System.out.println(indic);
    }

}


import java.util.Scanner;

/**
 *
 * @author DShuren
 */
public class SlonRozdol {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] mass = new int[n];
        for (int i = 0; i < n; i++) {
            mass[i] = in.nextInt();
        }
        int s = 0, min = mass[0];
        for (int j = 0; j < n; j++) {
            if (min > mass[j]) {
                min = mass[j];
                s++;

            }
        }
        if (s >= 1) {
            System.out.println("Still Rozdil");
        }
        else {
            System.out.println(min);
        }
    }
}


import java.util.Scanner;

/**
 *
 * @author DShuren
 */
public class SlonRozdol {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] mass = new int[n];
        for (int i = 0; i < n; i++) {
            mass[i] = in.nextInt();
        }
        int s = 0, min = mass[0];
        for (int j = 0; j < n; j++) {
            if (min >= mass[j]) {
                min = mass[j];

            }
        }
        for(int k=0;k<mass.length;k++){
            if(mass[k]==min){
                s++;
            }
        }
        if(s>1){
            System.out.println("Still Rozdil");
        }
        else if(s==1){
            System.out.println(min);
        }
    }
}


import java.util.Scanner;

/**
 *
 * @author DShuren
 */
public class SlonRozdol {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] mass = new int[n];
        for (int i = 0; i < n; i++) {
            mass[i] = in.nextInt();
        }
        int s = 0, min = mass[0];
        for (int j = 0; j < n; j++) {
            if (min >= mass[j]) {
                min = mass[j];

            }
        }
        for (int k = 0; k < mass.length; k++) {
            if (mass[k] == min) {
                s++;
            }
        }
        if (s > 1) {
            System.out.println("Still Rozdil");
        } else if (s == 1) {
            for (int k = 0; k < mass.length; k++) {
                if (min >= mass[k]) {
                    min = mass[k];
                    System.out.println(k+1);
                }
            }
        }
    }
}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.InputMismatchException;

public class LittleElephant {
	public void solve(int testNumber,InputReader in,OutputWriter out) {
		int n = in.readInt();
		int min = in.readInt();
		int minIndex = 1;
		boolean repeated = false;
		for(int i = 2;i<= n; i++) {
			int a = in.readInt();
			if(min>a) {
				min = a;
				minIndex = i;
				repeated = false;
			} else if(min == a) {
				repeated = true;
			}
		}
		if(repeated) {
			out.print("Still Rozdil");
		} else {
			out.print(minIndex);
		}
	}

	public static void main(String[] args) {
		/**FILE I/O
		 * InputStream inputStream;
		try {
			inputStream = new FileInputStream("input.txt");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		OutputStream outputStream;
		try {
			outputStream = new FileOutputStream("output.txt");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		 */
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		LittleElephant solver = new LittleElephant();
		solver.solve(1, in, out);
		out.close();
	}

}
class InputReader {

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

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

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

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

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

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

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

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

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
				outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object... objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.InputMismatchException;

public class LittleElephant {
	public void solve(int testNumber,InputReader in,OutputWriter out) {
		int n = in.readInt();
		int min = in.readInt();
		int minIndex = 1;
		boolean repeated = false;
		for(int i = 2;i<= n; i++) {
			int a = in.readInt();
			if(min>a) {
				min = a;
				minIndex = i;
				repeated = false;
			} else if(min == a) {
				repeated = true;
			}
		}
		if(repeated) {
			out.print("Still Rodzil");
		} else {
			out.print(minIndex);
		}
	}

	public static void main(String[] args) {
		/**FILE I/O
		 * InputStream inputStream;
		try {
			inputStream = new FileInputStream("input.txt");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		OutputStream outputStream;
		try {
			outputStream = new FileOutputStream("output.txt");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		 */
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		LittleElephant solver = new LittleElephant();
		solver.solve(1, in, out);
		out.close();
	}

}
class InputReader {

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

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

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

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

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

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

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

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

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
				outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object... objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

}


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

/**
 *
 * @author sukhdeep
 */
public class Simple {
    public static void main(String a[]) throws IOException
    {
        BufferedReader r=new BufferedReader(new InputStreamReader(System.in));

        int n=Integer.parseInt(r.readLine());int count=0;int index=-1;
        long min=(long)1e10;
        StringTokenizer str=new StringTokenizer(r.readLine());
        for(int i=0;i<n;i++)
        {long t=Long.parseLong(str.nextToken());
         if(min>t)
         {
             min=t;
             count=0;
             index=i;
         }
         else if(min==t)
             count++;
        }
        if(count==0)
        System.out.println(index+1);
        else
            System.out.println("Still Rozdil");
    }

}


import java.util.*;
public class rozdil
{
    public static void main(String qq[])
    {
        Scanner ob=new Scanner(System.in);
        int t=0,i,min;
        int n=ob.nextInt();
        int a[]=new int[n];

        for(i=0;i<n;i++)
        {
            a[i]=ob.nextInt();
        }
        min=a[0];
        for(i=0;i<n;i++)
        {
           if(min>a[i])
           min=a[i];
        }

        for(i=0;i<n;i++)
        if(a[i]==min)
        t++;
        if(t==1)
        {
            for(i=0;i<n;i++)
            if(a[i]==min)
            {
                System.out.println(i+1);
                break;
            }
        }
        if(t>1)
        System.out.println("Still Rozdil");
    }
}


/* |-_-| */
#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int a[n];
	for(int i = 0;i < n;i++) cin >> a[i];

	int time = 100005, ans = -1, c = 0;
	for(int i = 0;i < n;i++) {
		if(time > a[i]) {
			time = a[i];
			ans = i+1;
		}
	}
	for(int i = 0;i < n;i++) {
		if(time == a[i])
			c++;
	}

	if(c != 1) cout << "Still Rozdil" << endl;
	else cout << ans << endl;

	return 0;
}


/* |-_-| */
#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int a[n];
	for(int i = 0;i < n;i++) cin >> a[i];

	int time = 1000000007, ans = -1, c = 0;
	for(int i = 0;i < n;i++) {
		if(time > a[i]) {
			time = a[i];
			ans = i+1;
		}
	}
	for(int i = 0;i < n;i++) {
		if(time == a[i])
			c++;
	}

	if(c != 1) cout << "Still Rozdil" << endl;
	else cout << ans << endl;

	return 0;
}


/* |-_-| */
#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int a[n];
	for(int i = 0;i < n;i++) cin >> a[i];

	int time = 100005, ans = -1, c = 2;
	for(int i = 0;i < n;i++) {
		if(time > a[i]) {
			time = a[i];
			ans = i+1;
		}
	}
	for(int i = 0;i < n;i++) {
		if(time == a[i])
			c++
	}

	if(c != 1) cout << "Still Rozdil" << endl;
	else cout << ans << endl;

	return 0;
}


/* |-_-| */
#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int a[n];
	for(int i = 0;i < n;i++) cin >> a[i];

	int time = 100005, ans = -1;
	bool nowhere = false;
	for(int i = 0;i < n;i++) {
		if(time > a[i]) {
			time = a[i];
			ans = i+1;
		}
	}
	for(int i = 0;i < n && !nowhere;i++) {
		if(time == a[i])
			nowhere = true;
	}

	if(nowhere) cout << "Still Rozdil" << endl;
	else cout << ans << endl;

	return 0;
}


/* |-_-| */
#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int a[n];
	for(int i = 0;i < n;i++) cin >> a[i];

	int time = 100005, ans = -1;
	bool nowhere = false;
	for(int i = 0;i < n && !nowhere;i++) {
		if(time == a[i])
			nowhere = true;
		if(time > a[i]) {
			time = a[i];
			ans = i+1;
		}
	}

	if(nowhere) cout << "Still Rozdil" << endl;
	else cout << ans << endl;

	return 0;
}


#include <iostream>
#include <cstdio>
#include <map>

using namespace std;

int main()
{

    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
    cin >> temp;
    n--;
    map<long long, int> mlli;
    smallest = temp;
    int index = 1, ans = 1;
    mlli[temp] = 1;
    while(n--)
    {
        index++;
        cin >> temp;
        if(!((mlli.count(temp) > 0) && (temp == smallest))
        {
            mlli[temp] = 1;
            if(smallest > temp)
            {
                ans = index;
                smallest = temp;
                flag = false;
            }
        }
        else
        {

            flag = true;
            break;
        }

    }
    if(!flag) cout << ans << endl;
    else cout << "Still Rozdil" << endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <map>

using namespace std;

int main()
{

    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
    cin >> temp;
    n--;
    map<long long, int> mlli;
    smallest = temp;
    int index = 1, ans = 1;
    mlli[temp] = 1;
    while(n--)
    {
        index++;
        cin >> temp;
        if(!((mlli.count(temp) > 0) && (temp == smallest)))
        {
            mlli[temp] = 1;
            if(smallest > temp)
            {
                ans = index;
                smallest = temp;
                flag = false;
            }
        }
        else
        {

            flag = true;
            break;
        }

    }
    if(!flag) cout << ans << endl;
    else cout << "Still Rozdil" << endl;
    return 0;
}


#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    long long arr[100000] = {0};
    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
   cin >> temp;
    n--;
    arr[temp] = 1;
    smallest = temp;
    int index = 1;
    int ans = 1;
    while(n--)
    {
        index++;
        cin >> temp;
        if(arr[temp] != 1)
        {
            arr[temp] = 1;
            if(smallest > temp)
            {
                ans = index;
                smallest = temp;
            }
        }
        else
        {
            cout << "Still Rozdil" << endl;
            flag = true;
            break;
        }

    }
    if(!flag) cout << ans << endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <map>

using namespace std;

int main()
{

    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
    cin >> temp;
    n--;
    map<long long, int> mlli;
    smallest = temp;
    int index = 1, ans = 1;
    mlli[temp] = 1;
    while(n--)
    {
        index++;
        cin >> temp;
        if(!(mlli.count(temp) > 0))
        {
            mlli[temp] = 1;
            if(smallest > temp)
            {
                ans = index;
                smallest = temp;
            }
        }
        else
        {
            cout << "Still Rozdil" << endl;
            flag = true;
            break;
        }

    }
    if(!flag) cout << ans << endl;
    return 0;
}


#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    long long arr[100000] = {0};
    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
    cin >> temp;
    n--;
    arr[temp] = 1;
    smallest = temp;
    int index = 1;
    int ans = 0;
    while(n--)
    {
        index++;
        scanf("%lld", &temp);
        if(arr[temp] != 1)
        {
            arr[temp] = 1;
            if(smallest > temp)
            {
                ans = index;
                smallest = temp;
            }
        }
        else
        {
            cout << "Still Rozdil" << endl;
            flag = true;
            break;
        }

    }
    if(!flag) cout << ans << endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <map>

using namespace std;

int main()
{

    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
    cin >> temp;
    n--;
    map<long long, int> mlli;
    smallest = temp;
    int index = 1, ans = 1;
    mlli[temp] = 1;
    while(n--)
    {
        index++;
        cin >> temp;
        if(!((mlli.count(temp) > 0) && (temp == smallest)))
        {
            mlli[temp] = 1;
            if(smallest > temp)
            {
                ans = index;
                smallest = temp;
                flag = false;
            }
        }
        else
        {

            flag = true;

        }

    }
    if(!flag) cout << ans << endl;
    else cout << "Still Rozdil" << endl;
    return 0;
}


#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    long long arr[100000] = {0};
    long long n, temp;
    scanf("%d", &n);
    long long smallest = 0;
    bool flag = false;
    scanf("%lld", &temp);
    n--;
    arr[temp] = 1;
    smallest = temp;
    while(n--)
    {
        cin >> temp;
        if(arr[temp] != 1)
        {
            arr[temp] = 1;
            if(smallest > temp)
                smallest = temp;
        }
        else
        {
            cout << "Still Rozdil" << endl;
            flag = true;
            break;
        }

    }
    if(!flag) cout << smallest << endl;
    return 0;
}


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

int arr[(int)1e4+5]={};

int main()
{
    int n,mn=1000000,mni;
    cin>>n;
    for(int i=0;i<n;i++){
        int x;
        cin>>x;
        arr[x]++;
        if(x<mn)
         mn=min(mn,x);
         mni=i+1;
    }
    if(arr[mn]!=1){
        cout<<"Still Rozdil";
    }
    else cout<<mni;

 return 0;
}


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

int arr[(int)1e5+5]={};

int main()
{
    int n,mn=1000000,mni=1;
    cin>>n;
    for(int i=0;i<n;i++){
        int x;
        cin>>x;
        arr[x]++;
        if(x<mn)
         mn=min(mn,x);
         mni=i+1;
    }
    if(arr[mn]!=1){
        cout<<"Still Rozdil";
    }
    else cout<<mni;

 return 0;
}


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

int main()
{
    int n;
    cin>>n;
    vector<pair<int,int>>v;
    for(int i=0;i<n;i++){
        int x;
        cin>>x;
        v.push_back({x,i+1});
    }
    sort(v.begin(),v.end());
    if(v.size()==1 || (v.size()>1 && v[0].first!=v[1].first) ){
        cout<<v[0].second;
    }
    else cout<<"Still Rozdil";

 return 0;
}


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

int arr[(int)1e4+5]={};

int main()
{
    int n,mn=10000000,mni=1;
    cin>>n;
    for(int i=0;i<n;i++){
        int x;
        cin>>x;
        arr[x]++;
        if(x<mn)
         mn=min(mn,x);
         mni=i+1;
    }
    if(arr[mn]!=1){
        cout<<"Still Rozdil";
    }
    else cout<<mni;

 return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
	long long n, a = 1e9 + 20 + 20, d;
	cin >> n;
	for(int i = 1; i <= n; i ++){
		long long x;
		cin >> x;
		if(a > x){
			a = x;
			d = i;
			//cout << a << endl;
		}
		else if(x == a){
			d = -1;
			break;
		}
	}
	if(d == -1){
		cout << "Still Rozdil";
	}
	else{
		cout << d;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
	long long n, a = 1e9 + 20 + 20, d;
	pair <long long, int> b[100008];
	cin >> n;
	for(int i = 1; i <= n; i ++){
		cin >> b[i].first;
		b[i].second = i;
	}
	sort(b + 1, b + n + 1);
//	cout << b[1].second << " " << b[2].second;
	if(b[1] == b[2]){
		cout << "Still Rozdil";
	}
	else{
		cout << b[1].second;
	}
	return 0;
}


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

void rip(){
  ll n,i,sum=0 ;
  cin>>n ;
  ll a[n];
  for(i=0; i<n; i++)
    cin>>a[i] ;
  ll H[n]={0} ;

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

  for(i=0; i<n; i++){
    if(H[i] > 0)
      sum ++ ;
  }

  ll bsdk = (n*(n-1)/2) - 1 ;
  if(sum <= bsdk )
    cout<<"YES"<<"\n";
  else
    cout<<"NO"<<"\n";
}
int main()
{
    #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin) ;
     freopen("output.txt", "w", stdout)  ;
    #endif

    ll t ;
    cin>>t ;
    while(t--){
     rip() ;
    }
    return 0;
}


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

void solve(){
	ll i, n ;
	cin>>n;
	vector<ll>v(n) ;
	for(i=0; i<n; i++){
		cin>>v[i] ;
	}

	if(v[n-1] < v[n-2])
		cout<<"NO"<<"\n";
	else
		cout<<"YES"<<"\n" ;
}
int main(){

   ll t;
   cin>>t;
   while(t--){
   	 solve() ;
   }

  return 0;
}


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

void rip(){
  ll n ,i,j,sum=0 ;
  cin>>n ;

  vector<ll>a(n);
  for(i=0; i<n; i++)
    cin>>a[i];

  ll maxi = (n*(n-1)/2) - 1;

  for(i=0; i<n-1; i++){
    for(j=0; j<n-i-1; j++){
      if(a[j] > a[j+1]){
        //swap(&a[j], &a[j+1]) ;
        ll temp = a[j];
        a[j] = a[j+1];
        a[j+1] = temp;
        sum++;
      }

    }
  }

  if(sum <= maxi)
   cout<<"YES"<<"\n";
  else
    cout<<"NO"<<"\n";
}
int main()
{
    #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin) ;
     freopen("output.txt", "w", stdout)  ;
    #endif

    ll t ;
    cin>>t ;
    while(t--){
     rip() ;
    }
    return 0;
}


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

void rip(){
  ll n ,i,j,sum=0 ;
  cin>>n ;

  vector<ll>a(n);
  for(i=0; i<n; i++)
    cin>>a[i];

  ll maxi = (n*(n-1)/2) - 1 ;
  if(n<= maxi)
   cout<<"YES"<<"\n";
  else
    cout<<"NO"<<"\n";
}
int main()
{
    #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin) ;
     freopen("output.txt", "w", stdout)  ;
    #endif

    ll t ;
    cin>>t ;
    while(t--){
     rip() ;
    }
    return 0;
}


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

void solve(){
	ll i, n ;
	cin>>n;
	vector<ll>v(n) ;
	for(i=0; i<n; i++){
		cin>>v[i] ;
	}

	if(v[n-1] < v[n-2])
		cout<<"YES"<<"\n";
	else
		cout<<"NO"<<"\n" ;
}
int main(){

   ll t;
   cin>>t;
   while(t--){
   	 solve() ;
   }

  return 0;
}


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

void solve(){
	ll i, n ;
	cin>>n;
	vector<ll>v(n) ;
	for(i=0; i<n; i++){
		cin>>v[i] ;
	}
   bool p = false ;
   for(i=0; i<n; i++){
   	 if(v[i+1] > v[i] )
   	 	p=true;
   }

   if(p)
   	cout<<"YES"<<"\n" ;
   else
   	 cout<<"NO"<<"\n" ;
}
int main(){

   ll t;
   cin>>t;
   while(t--){
   	 solve() ;
   }

  return 0;
}


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

void rip(){
  ll n ,i,j,sum=0 ;
  cin>>n ;

  vector<ll>a(n);
  for(i=0; i<n; i++)
    cin>>a[i];

  ll maxi = (n*(n-1)/2) - 1 ;
  if(n<= maxi)
   cout<<"YES"<<"\n";
  else
  if(n>maxi)
    cout<<"NO"<<"\n";
}
int main()
{
    #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin) ;
     freopen("output.txt", "w", stdout)  ;
    #endif

    ll t ;
    cin>>t ;
    while(t--){
     rip() ;
    }
    return 0;
}


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

void solve(){
	ll i, n ;
	cin>>n;
	vector<ll>v(n) ;
	for(i=0; i<n; i++){
		cin>>v[i] ;
	}
   bool p = false ;
   for(i=0; i<n; i++){
   	 if(v[i+1] < v[i] ){
   	 	p=true;
   	 	break;
   	 }
   }

   if(p)
   	cout<<"YES"<<"\n" ;
   else
   	 cout<<"NO"<<"\n" ;
}
int main(){

   ll t;
   cin>>t;
   while(t--){
   	 solve() ;
   }

  return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}

		int cnt = n * (n-1) / 2 - 1;

		int num = 0;
		int t1 = 0;
		for(int i=1; i<=n; i++)	{
			if(a[i+1] > a[i]) {
				num++;
			}
		}
		if(num<(n-1))	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}

		int cnt = n * (n-1) / 2 - 1;

		int num = 0;
		int t1 = 0;
		for(int i=1; i<n; i++)	{
			if(a[i+1] < a[i]) {
				num++;
			}
		}
		if(num<(n-1))	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int a[50050],b[50050];
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		int n;
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}
		if(n>=3) {
			cout<<"YES"<<endl;
		}else{
			if(n==2) {
				if(a[1]<=a[2]) {
					cout<<"YES"<<endl;
				}else{
					cout<<"NO"<<endl;
				}
			}
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
void init(int size)
{
	for(int i=1; i<=size+10; i++) {
		c[i] = 0;
	}
}
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		init(n);
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}

		int cnt = n * (n-1) / 2 - 1;

		int num = 0;
		int t1 = 0;
		for(int i=1; i<=n; i++)	{
			if(a[i+1] > a[i]) {
				num++;
			}
		}
		if(num<cnt)	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
void init(int size)
{
	for(int i=1; i<=size+10; i++) {
		c[i] = 0;
	}
}
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		init(n);
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}

		int cnt = n * (n-1) / 2 - 1;

		int num = 0;
		int t1 = 0;
		for(int i=1; i<n; i++)	{
			if(a[i+1] > a[i]) {
				num++;
			}
		}
		if(num<n-1)	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int a[50050],b[50050];
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		int n;
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}
		if(n>=3) {
			cout<<"YES"<<endl;
		}else{
			if(n==2) {
				if(a[0]<=a[1]) {
					cout<<"YES"<<endl;
				}else{
					cout<<"NO"<<endl;
				}
			}
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}

		int cnt = n * (n-1) / 2 - 1;

		int num = 0;
		int t1 = 0;
		for(int i=1; i<n; i++)	{
			if(a[i+1] > a[i]) {
				num++;
			}
		}
		if(num<(n-1))	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
void init(int size)
{
	for(int i=1; i<=size+10; i++) {
		c[i] = 0;
	}
}
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		init(n);
		for(int i=1; i<=n; i++) {
			cin>>a[i];
		}

		int cnt = n * (n-1) / 2 - 1;

		int num = 0;
		int t1 = 0;
		for(int i=1; i<=n; i++)	{
			if(a[i+1] > a[i]) {
				num++;
			}
		}
		if(num<n-1)	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int a[50050],b[50050];
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		int n;
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
			b[i]=a[i];
		}
		if(n>=4) {
			cout<<"YES"<<endl;
		}else{
			if(n==2) {
				if(a[1]<=a[2]) {
					cout<<"YES"<<endl;
				}else{
					cout<<"NO"<<endl;
				}
			}else{
				sort(b+1,b+1+n);
				if(a[1]==b[1] || a[2]==b[2] || a[3]==b[3]) {
					cout<<"YES"<<endl;
				}else{
					cout<<"NO"<<endl;
				}
			}
		}

	}

	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int a[50050],b[50050];
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		int n;
		cin>>n;
		for(int i=1; i<=n; i++) {
			cin>>a[i];
			b[i]=a[i];
		}
		int cnt = n*(n-1)/2 - 1;
		sort(a+1,a+1+n);
		int sign = 0;
		for(int i=1; i<=n; i++) {
			if(a[i]!=b[i]) sign++;
		}
		if(sign<=cnt) {
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int a[50050],b[50050],c[50050];
int n;
void init(int size)
{
	for(int i=1; i<=size+10; i++) {
		c[i] = 0;
	}
}
int main()
{

	int t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		init(n);
		for(int i=1; i<=n; i++) {
			cin>>a[i];
			b[i]=a[i];
		}

		sort(b+1,b+1+n);

		int cnt = n * (n-1) / 2 - 1;

		int p = 0;
		int sign = b[++p];
		int ans = 0;
		while(p<=n)
		{
			int t1 = 0;
			for(int i=1; i<=n; i++) {
				if(c[i]) {
					t1 ++;
					continue;
				}
				if(sign == a[i]) {
					ans += abs(i-p)-t1;
					sign = b[++p];
					c[i] = 1;
					break;
				}
			}
		}
		if(ans<=cnt)	{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}

	}

	return 0;
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vl a(n); for (auto &it: a) cin >> it;
  bool no = false;
  for (int i = 1; i < n; i++)
    if (a[i-1] <= a[i]) no = true;
  cout << (no ? "YES" : "NO") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vl a(n); for (auto &it: a) cin >> it;
  bool no = false;
  for (int i = 1; i < n; i++)
    if (a[i - 1] >= a[i]) no = true;
  cout << (!no || n == 2 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vi a(n); for (auto &it: a) cin >> it;
  bool no = true;
  for (int i = 1; i < n; i++)
    if (a[i - 1] < a[i]) no = true;
  cout << (!no || n == 2 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vi a(n); for (auto &it: a) cin >> it;
  bool no = true;
  for (int i = 1; i < n; i++)
    if (a[i-1]<=a[i]) no = true;
  cout << (!no || n == 2 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vi a(n); for (auto &it: a) cin >> it;
  bool no = true;
  for (int i = 0; i < n - 1; i++)
    if (a[i] < a[i + 1]) no = true;
  cout << (!no || n == 2 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
  //cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vl a(n); for (auto &it: a) cin >> it;
  bool no = false;
  for (int i = 1; i < n; i++)
    if (a[i - 1] <= a[i]) no = true;
  cout << (!no || n * (n-1) / 2 <= 1 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vi a(n); for (auto &it: a) cin >> it;
  bool no = false;
  for (int i = 1; i < n; i++)
    if (a[i-1]<=a[i]) no = true;
  cout << (!no ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
//  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vl a(n); for (auto &it: a) cin >> it;
  ll x = 0;
  for (int i = 1; i < n; i++)
    if (a[i - 1] > a[i]) x++;
  cout << (x >= n-1 || n == 2 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<bool> vb;

double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1);
int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 };
int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 };

#ifdef TESTING
#define DEBUG fprintf(stderr, "====TESTING====\n")
#define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define DEBUG
#define VALUE(x)
#define debug(...)
#endif
#define fastIO ios::sync_with_stdio(false); cin.tie(0);

void solve(int t) {
  cout << "#Case " << t << ": ";
  ll n; cin >> n;
  vl a(n); for (auto &it: a) cin >> it;
  bool no = false;
  for (int i = 1; i < n; i++)
    if (a[i - 1] <= a[i]) no = true;
  cout << (!no || n * (n-1) / 2 <= 1 ? "NO" : "YES") << '\n';
}

int main() {
  fastIO;
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve(i);
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

int main(){
    int t;
    cin>>t;

    while(t--){
        unsigned long n;cin>>n;
        vector<unsigned long> nums(n,0);

        bool sortable = false;

        for(long i =0;i<n;i++){
            cin>>nums[i];
        }
        //print(nums);
        unsigned long op = n*(n-1)/2-1;

        for(long i = 1;i<n;i++){
            if(nums[i-1]<=nums[i]){
                sortable = true;
                break;
            }
        }

        if(sortable)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                n--;
            }

        }

        if(n<0)return false;

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        int n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);
        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,unsigned long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                if(n!=0)
                n--;
                else return false;
            }

        }

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        unsigned long n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[i];
        }
        //print(nums);

        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,unsigned long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                if(n!=0)
                n--;
                else return false;
            }

        }

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        unsigned long n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);

        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,long n){
    int len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(int i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                n--;
            }

        }

        if(n<0)return false;

        for(int i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        int n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);
        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

/*
bool answer(vector<unsigned long>& nums,unsigned long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                if(n!=0)
                n--;
                else return false;
            }

        }

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}
 */

bool answer(vector<unsigned long>& nums,unsigned long n){

    unsigned long len = nums.size();

    for(unsigned long i = 1;i<len;i++){
        for(unsigned long j = 0;j<i;j++){
            if(nums[j]>nums[i]){
                if(n!=0)
                n--;
                else
                {
                    return false;
                }

            }
        }
    }

    return true;
}

int main(){
    int t;
    cin>>t;

    while(t--){
        unsigned long n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[i];
        }
        //print(nums);

        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                n--;
            }

        }

        if(n<0)return false;

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        long n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);
        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,unsigned long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                n--;
            }

        }

        if(n<0)return false;

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        unsigned long n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);

        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<long>& nums,long n){
    int len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(int i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                n--;
            }

        }

        if(n<0)return false;

        for(int i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        int n;cin>>n;
        vector<long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);
        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void print(const vector<long>& vec){
    for(auto i : vec)
        cout<<i<<" ";
    cout<<endl;
}

bool answer(vector<unsigned long>& nums,unsigned long n){
    unsigned long len = nums.size();
    bool notSorted = true;

    do{

        if(notSorted)
        for(unsigned long i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                swap(nums[i-1],nums[i]);
                n--;
            }

        }

        if(n<0)return false;

        for(unsigned long  i =1;i<len;i++){
            if(nums[i-1]>nums[i])
            {
                notSorted=true;
                break;
            }
            if(i==len-1)
                notSorted=false;

        }

    }while(notSorted);

    return true;

}

int main(){
    int t;
    cin>>t;

    while(t--){
        unsigned long n;cin>>n;
        vector<unsigned long> nums(n,0);

        for(int i =0;i<n;i++){
            cin>>nums[0];
        }
        //print(nums);
        int swaps
        if(answer(nums,n*(n-1)/2 - 1)){
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n] += dem;
}

int main(void)
{
    int t; cin >> t;
    FOR(j, 1, t)
    {
        cin >> n;
        FOR(i, 0, n - 1) cin >> arr[i];
        arr[n] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n - 1);
				if (arr[n] <= (n*(n-1)/2 - 1)) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n + 1] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1) / 2 - 1);
        n = n - 1;
        FOR(i, 0, n) cin >> arr[i];
        arr[n + 1] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[1] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n);
				if (arr[n + 1] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


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

int main(void)
{
	int n, a[1005], b[1005];
    int t; cin >> t;
    FOR(j, 1, t)
    {
        b[j] = 0;
        cin >> n;
        FOR(i, 1, n) cin >> a[i];
        int Mid, dem = 0;
        for(int k = 1; k <= n; k++)
            for(int l = 1 ; l <= k; l++)
            {
                if(a[l]>a[k])
                {
                    Mid=a[k];
                    a[k]=a[l];
                    a[l]=Mid;
                    dem++;
                }
            }
        if (dem > (n*(n-1)/2 - 1))
			b[j] = 1;
    }
    FOR(j, 1, t)
    if (b[j] == 0) cout << "YES\n";
    else cout << "NO\n";
    return 0;
}


#include<iostream>
#include<conio.h>
#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n = 5;
int arr[] = {5,3,2,1,4};
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j= rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n] += dem;
}

/*int main()
{

	arr[n] = 0;
	quicksort(arr,0,n - 1);
	cout << arr[n];
	return 0;
}*/

int main(void)
{
    int t; cin >> t;
    FOR(j, 1, t)
    {
        cin >> n;
        FOR(i, 0, n - 1) cin >> arr[i];
        arr[n] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n - 1);
				if (arr[n] <= (n*(n-1)/2 - 1)) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j= rightIndex;
	int pivot = arr[(leftIndex + rightIndex)(int)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n] += dem;
}

int main(void)
{
    int t; cin >> t;
    FOR(j, 1, t)
    {
        cin >> n;
        FOR(i, 0, n - 1) cin >> arr[i];
        arr[n] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n - 1);
				if (arr[n] <= (n*(n-1)/2(int) - 1)) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n + 1] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1) / 2 - 1);
        n = n - 1;
        FOR(i, 0, n) cin >> arr[i];
        arr[n + 1] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n);
				if (arr[n + 1] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[199999999];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n + 1] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1) / 2 - 1);
        n = n - 1;
        FOR(i, 0, n) cin >> arr[i];
        arr[n + 1] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n);
				if (arr[n + 1] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<iostream>
#include<conio.h>
#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j= rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n] += dem;
}

int main(void)
{
    int t; cin >> t;
    FOR(j, 1, t)
    {
        cin >> n;
        FOR(i, 0, n - 1) cin >> arr[i];
        arr[n] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n - 1);
				if (arr[n] <= (n*(n-1)/2 - 1)) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1)/2 - 1);
        FOR(i, 0, n - 1) cin >> arr[i];
        arr[n] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n - 1);
				if (arr[n] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


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

int main(void)
{
	int n, a[1005], b[1005];
    int t; cin >> t;
    FOR(j, 1, t)
    {
        b[j] = 0;
        cin >> n;
        FOR(i, 1, n) cin >> a[i];
        int dem = 0;
        for(int k = 1; k <= n; k++)
            for(int l = 1 ; l <= k; l++)
                if(a[l] > a[k]) dem++;
        if (dem > (n*(n-1)/2 - 1))
			b[j] = 1;
    }
    FOR(j, 1, t)
    if (b[j] == 0) cout << "YES\n";
    else cout << "NO\n";
    return 0;
}


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

#define ll long long
#define FOR(i, a, b) for(ll i = a; i <= b; i++)
#define FORB(i, a, b) for(ll i = a; i >= b; i--)

int main(void)
{
 //   freopen("Input.inp", "r", stdin);

	int t; cin >> t;
 	while(t--)
 	{
 		int n; cin >> n;
 		int a[50005]; FOR(i, 1, n) cin >> a[i];

 		bool ans = 0;
 		FOR(i, 2, n)
 			if (a[i] >= a[i - 1]) ans = 1;

	 	if (ans) cout << "YES\n"; else cout << "NO\n";
	}

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[10000];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n + 1] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1) / 2 - 1);
        n = n - 1;
        FOR(i, 0, n) cin >> arr[i];
        arr[n + 1] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n);
				if (arr[n + 1] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[10005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n + 1] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1) / 2 - 1);
        n = n - 1;
        FOR(i, 0, n) cin >> arr[i];
        arr[n + 1] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n);
				if (arr[n + 1] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


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

int main(void)
{
	int n, a[1005], b[1005];
    int t; cin >> t;
    FOR(j, 1, t)
    {
        b[j] = 0;
        cin >> n;
        FOR(i, 1, n) cin >> a[i];
        int Mid, dem = 0;
        for(int k = 1; k <= n; k++)
            for(int l = 1 ; l <= k; l++)
            {
                if(a[l] > a[k])
                {
                    //Mid = a[k];
                    //a[k] = a[l];
                    //a[l] = Mid;
                    dem++;
                }
            }
        if (dem > (n*(n-1)/2 - 1))
			b[j] = 1;
    }
    FOR(j, 1, t)
    if (b[j] == 0) cout << "YES\n";
    else cout << "NO\n";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[199999];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j = rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n + 1] += dem;
}

int main(void)
{
    int t; cin >> t;
    int k;
    FOR(j, 1, t)
    {
        cin >> n;
        k = (n*(n-1) / 2 - 1);
        n = n - 1;
        FOR(i, 0, n) cin >> arr[i];
        arr[n + 1] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n);
				if (arr[n + 1] <= k) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
int n;
int arr[1005];
void quicksort(int* arr, int leftIndex, int rightIndex)
{
	int dem = 0;
	int i = leftIndex;
	int j= rightIndex;
	int pivot = arr[(leftIndex + rightIndex)/(int)2];
	while(i <= j)
 	{
  		while(arr[i] < pivot) i++;
  		while(arr[j] > pivot) j--;
  		if(i <= j)
		{
			dem++;
   			int temp = arr[i];
   			arr[i] = arr[j];
   			arr[j] = temp;
   			i++; j--;
		}
  		if(i < rightIndex) quicksort(arr, i, rightIndex);
  		if(j > leftIndex) quicksort(arr, leftIndex, j);
 	}
 	arr[n] += dem;
}

int main(void)
{
    int t; cin >> t;
    FOR(j, 1, t)
    {
        cin >> n;
        FOR(i, 0, n - 1) cin >> arr[i];
        arr[n] = 0;
        	if (arr[1] == arr[2] && arr[2] == arr[3] && arr[0] == arr[1])
			{
				cout << "YES\n";
			}
        	else
        	{
				quicksort(arr,0,n - 1);
				if (arr[n] <= (n*(n-1)/(int)2 - 1)) cout << "YES\n";
    			else cout << "NO\n";
    		}
	}
    return 0;
}


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

int main(void)
{
	int n, a[1005];
    int t; cin >> t;
    FOR(j, 1, t)
    {
        cin >> n;
        FOR(i, 1, n) cin >> a[i];
        int dem = 0;
        for(int k = 1; k <= n; k++)
            for(int l = 1 ; l <= k; l++)
            {
                if(a[l] > a[k])
                {
                    dem++;
                }
            }
		if (dem <= (n*(n-1)/2 - 1)) cout << "YES\n";
    	else cout << "NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;
    int j=0;
    fp(i,0,n-1)
    {

        if(a[i]>=a[n-j-1])
        {
            c+=n-j-1-i;
        }

        else
        {
            while(a[i]<a[n-j-1])
            j++;

            c+=n-j-1-i;
        }

    }

    if(b>=c)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;

    fp(i,0,n-1)
    {
        if(a[i]>a[i+1])
        c+=n-i-1;
    }

    if(b>=c)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;
    int d=0;
    for(int i=0;i<n;i++)
    {
        for(int j=i;j<n-i-1;j++)
        {
            if(a[j]>a[j+1])
            {
            ll temp=a[j];
            a[j]=a[j+1];
            a[j+1]=temp;
            c++;
            }
        }

        if(c>b)
        {
            d++;
            break;
        }
    }
    if(d==0)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;
    int d=0;
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n-i-1;j++)
        {
            if(a[j]>a[j+1])
            {
            ll temp=a[j];
            a[j]=a[j+1];
            a[j+1]=temp;
            c++;
            }
        }

        if(c>b)
        {
            d++;
            break;
        }
    }
    if(d==0)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];
    ll z=a[0];
    int c=0;
    int b=n*(n-1)/2-1;

    fp(i,0,n-1)
    {
        if(a[i]>a[i+1])
        c++;
    }

    if(c==n-1)
    cout<<"NO"<<endl;
    else
    cout<<"YES"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;
    int d=0;
    for(int i=0;i<n;i++)
    {
        int e=0;
        for(int j=0;j<n-i-1;j++)
        {
            if(a[j]>a[j+1])
            {
            ll temp=a[j];
            a[j]=a[j+1];
            a[j+1]=temp;
            c++;
            e++;
            }
        }
        if(e==0)
        break;

        if(c>b)
        {
            d++;
            break;
        }
    }
    if(d==0)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;

    fp(i,0,n)
    {
        if(a[i]>a[i+1])
        c++;
    }

    if(b>=c)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];

    int c=0;
    int b=n*(n-1)/2-1;
    int j=0;
    fp(i,0,n-1)
    {

        if(a[i]>a[n-j-1])
        {
            c+=n-j-1-i;
        }

        else
        {
            while(a[i]<=a[n-j-1])
            j++;

            c+=n-j-1-i;
        }

    }

    if(b>=c)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}
bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){
	int n;
    cin>>n;

    vll a(n);

    fp(i,0,n)
    cin>>a[i];
    ll z=a[0];
    int c=0;
    int b=n*(n-1)/2-1;

    fp(i,1,n)
    {
        if(z>a[i])
        c+=(i);

        z=a[i];

    }

    if(b>=c)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

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

	int t=1;
	cin>>t;
	while(t--){
		code();
	}
}