#CCBCHBAHAI0000051. Sửa vòng lặp duyệt sai cận (Fix an Off-by-One Array Loop)

Sửa vòng lặp duyệt sai cận (Fix an Off-by-One Array Loop)

Fix an Off-by-One Array Loop

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

An array has logical size nn, so its valid indices are 0,1,…,n−10,1,\ldots,n-1. A program intends to traverse it using for (i = 0; i <= b; ++i) and accesses aia_i at every iteration.

Determine whether this loop is safe. If b≥nb\ge n, the first out-of-bounds access occurs at index nn. Do not attempt to predict the value of ana_n because that access is outside the valid array range.

Input

One line contains two integers nn and bb, where n≥1n\ge1 and b≥0b\ge0.

Output

  • If every index from 00 through bb is valid, print SAFE.
  • Otherwise print OUT_OF_BOUNDS x, where xx is the first invalid index.

Subtasks

Subtask 1 (20 points): 1≤n≤1001\le n\le100, b=n−1b=n-1.

Subtask 2 (30 points): 1≤n≤10001\le n\le1000, b=nb=n.

Subtask 3 (50 points): 1≤n≤1091\le n\le10^9, 0≤b≤2n0\le b\le2n.

Examples

Input

5 5

Output

OUT_OF_BOUNDS 5

Explanation

For n=5n=5, only indices 0,1,2,3,40,1,2,3,4 are valid. Since the loop condition is i≤5i\le5, after processing i=4i=4 it still executes once with i=5i=5. Index 5=n5=n is outside the array, so the first invalid index is 55.