/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int k = Integer.parseInt(br.readLine()); int l = Integer.parseInt(br.readLine()); String[] lines; ArrayList pairs = new ArrayList(); for(int i=0;i nlines[i+1]){ ans.append(i+1).append(" ").append(i+2).append("\n"); int tmp = nlines[i]; nlines[i] = nlines[i+1]; nlines[i+1] = tmp; i=-1; cnt++; } } System.out.println(cnt); System.out.println(ans); } public static class Pair{ public int a; public int b; public Pair(int a,int b){ this.a = a; this.b = b; } } }