title: Iterating over arrays Check if an array contains two numbers
body: <p>Write a program that reads an unsorted array of integers and two numbers <code>n</code> and <code>m</code>. The program must check if <code>n</code> and <code>m</code> occur <strong>next to each other</strong> in the array (in any order).</p>
  <h3>Input data format</h3>
  <ul>
  <li>The first line contains the <em>size</em> of an array.</li>
  <li>The second line contains <em>elements</em> of the array.</li>
  <li>The third line contains two integer numbers <code>n</code> and <code>m</code>.</li>
  </ul>
  <p>All numbers in the same line are separated by the <em>space</em> character.</p>
  <h3>Output data format</h3>
  <p>Only a single value: <code>true</code> or <code>false</code>.</p>
  <pre><code>import java.util.Scanner;
  
  class Main {
      public static void main(String[] args) {
          Scanner scanner = new Scanner(System.in);
          int size = scanner.nextInt();
          int[] table = new int[size];
          for (int i = 0; i &lt; table.length; i++) {
              table[i]=scanner.nextInt();
          }
          int n = scanner.nextInt();
          int m = scanner.nextInt();
  
          for (int i = 0; i &lt; table.length ; i++) {
              //stuck here 
          }
      }
  }
  </code></pre>