#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5;
const int INF = 2 * MAXN + 7;
int a[MAXN + 7];
vector<int> edge[MAXN + 7];
vector<int> redge[MAXN + 7];
int dist[MAXN + 7];
pair<int, int> steps[MAXN + 7];
int nxt[MAXN + 7];
int p[MAXN + 7];
int main() {
  int tc = 1;
  for (int tci = 1; tci <= tc; tci++) {
    int n, m;
    scanf("%d %d", &n, &m);
    for (int i = 0; i < m; i++) {
      int u, v;
      scanf("%d %d", &u, &v);
      edge[u].push_back(v);
      redge[v].push_back(u);
    }
    int k;
    scanf("%d", &k);
    for (int i = 1; i <= k; i++) {
      scanf("%d", &p[i]);
      if (i > 0) {
        nxt[p[i - 1]] = p[i];
      }
    }
    for (int i = 1; i <= n; i++) {
      dist[i] = INF;
    }
    queue<int> q;
    dist[p[k]] = 0;
    q.push(p[k]);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (int i = 0; i < redge[u].size(); i++) {
        int v = redge[u][i];
        if (dist[v] > dist[u] + 1) {
          dist[v] = dist[u] + 1;
          if (nxt[v] == u) {
            steps[v].first = 1;
          } else {
            steps[v].second = 1;
          }
          q.push(v);
        } else if (dist[v] == dist[u] + 1) {
          if (nxt[v] == u) {
            steps[v].first = 1;
          } else {
            steps[v].second = 1;
          }
        }
      }
    }
    int minv = 0;
    int maxv = 0;
    for (int i = 1; i <= k - 1; i++) {
      if (steps[p[i]].first == 0) {
        minv++;
        maxv++;
      } else if (steps[p[i]].second == 1) {
        maxv++;
      }
    }
    cout << minv << " " << maxv << "\n";
  }
  return 0;
}
