#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
int dir[8][2] = {-1, 0, 1, 0, 0, -1, 0, 1, -1, -1, -1, 1, 1 - 1, 1, 1};
template <typename S, typename T>
inline bool Min(S &a, const T &b) {
  return a > b ? a = b, true : false;
}
template <typename S, typename T>
inline bool Max(S &a, const T &b) {
  return a < b ? a = b, true : false;
}
template <typename S, typename T>
inline void Adm(S &a, const T &b) {
  a = (a + b) % MOD;
  if (a < 0) a += MOD;
}
template <typename S, typename T>
inline void Mum(S &a, const T &b) {
  a = 1LL * a * b % MOD;
}
template <typename T>
inline bool IsPri(T x) {
  if (x < 2) return false;
  for (T i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
template <typename T>
inline T Gcd(T a, T b) {
  while (b) {
    T t = b;
    b = a % b;
    a = t;
  }
  return a;
}
template <typename T>
inline int BitCnt(T x) {
  int cnt = 0;
  while (x) ++cnt, x &= x - 1;
  return cnt;
}
template <typename T>
inline T MDis(T x1, T y1, T x2, T y2) {
  return abs(x1 - x2) + abs(y1 - y2);
}
template <typename T>
inline T MDis(T x1, T y1, T z1, T x2, T y2, T z2) {
  return abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2);
}
inline double EDis(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
inline double EDis(double x1, double y1, double z1, double x2, double y2,
                   double z2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) +
              (z1 - z2) * (z1 - z2));
}
inline long long Pow(long long a, long long n) {
  long long t = 1;
  a %= MOD;
  while (n > 0) {
    if (n & 1) t = t * a % MOD;
    a = a * a % MOD, n >>= 1;
  }
  return t % MOD;
}
const int maxn = 2e5 + 10;
int a[maxn], dis[maxn], cnt[maxn];
bool vis[maxn];
vector<int> e[maxn];
void bfs(int st) {
  queue<int> q;
  q.push(st);
  memset(dis, 0x3f, sizeof(dis));
  dis[st] = 0;
  cnt[st] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (auto v : e[u]) {
      if (!vis[v] && dis[v] > dis[u] + 1)
        vis[v] = 1, dis[v] = dis[u] + 1, q.push(v), cnt[v] = 1;
      else if (dis[v] == dis[u] + 1)
        cnt[v] += cnt[u];
    }
  }
}
map<int, int> mp[maxn];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[v].push_back(u);
    mp[u][v] = 1;
  }
  int k;
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]);
  }
  bfs(a[k]);
  int l = 0, r = 0;
  for (int i = 1; i < k; i++) {
    if (!mp[a[i]].count(a[i + 1])) {
      l = 0, r = 0;
      break;
    }
    if (dis[a[i + 1]] + 1 == dis[a[i]]) {
      if (cnt[a[i]] > 1) r++;
    } else
      l++;
  }
  cout << l << ' ' << l + r << endl;
  return 0;
}
