Given an integer `n`, return `true` _if_ `n` _has **exactly three positive divisors**. Otherwise, return_ `false`.

An integer `m` is a **divisor** of `n` if there exists an integer `k` such that `n = k * m`.

**Example 1:**

**Input:** n = 2
**Output:** false
**Explantion:** 2 has only two divisors: 1 and 2.

**Example 2:**

**Input:** n = 4
**Output:** true
**Explantion:** 4 has three divisors: 1, 2, and 4.

**Constraints:**

*   `1 <= n <= 104`


def minSideJumps(obstacles):
    n = len(obstacles)
    dp = [[n] * 3 for _ in range(n)]
    dp[0][1] = 0
    dp[0][0] = dp[0][2] = 1

    for i in range(1, n):
        if obstacles[i] != 1:
            dp[i][0] = min(dp[i - 1][0], dp[i - 1][1] + 1, dp[i - 1][2] + 1)
        if obstacles[i] != 2:
            dp[i][1] = min(dp[i - 1][1], dp[i - 1][0] + 1, dp[i - 1][2] + 1)
        if obstacles[i] != 3:
            dp[i][2] = min(dp[i - 1][2], dp[i - 1][0] + 1, dp[i - 1][1] + 1)

    return min(dp[-1])
