PUMaC 2021 Number Theory A Problem 2

A \mathit{substring}~ of a number n is a number formed by removing any number of digits from the beginning and end of n (not necessarily the same number of digits are removed from each side). Find the sum of all prime numbers p that have the property that any substring of p is also prime.