
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
A *substring* of a number  $n$  is a number formed by removing some digits from the beginning and end of  $n$  (possibly a different number of digits is removed from each side). Find the sum of all prime numbers  $p$  that have the property that any substring of  $p$  is also prime.


Present the answer in LaTex format: \boxed{Your answer}
user