#include <bits/stdc++.h>
using namespace std;
int dir[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979;
const int mod = 998244353;
const int N = 2e5 + 5;
inline long long read() {
  long long x = 0;
  bool f = true;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = false;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return f ? x : -x;
}
long long gcd(long long m, long long n) { return n == 0 ? m : gcd(n, m % n); }
struct node {
  int cnt;
  vector<int> sa;
} a[N];
bool vis[N];
int pathlen;
vector<int> path(N);
vector<vector<int>> b(N);
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    a[v].sa.push_back(u);
    b[u].push_back(v);
  }
  cin >> pathlen;
  for (int i = 0; i < pathlen; i++) {
    cin >> path[i];
  }
  queue<node> que;
  que.push(a[path[pathlen - 1]]);
  vis[path[pathlen - 1]] = 1;
  while (!que.empty()) {
    node front = que.front();
    que.pop();
    for (int i = 0; i < front.sa.size(); i++) {
      if (!vis[front.sa[i]]) {
        vis[front.sa[i]] = 1;
        a[front.sa[i]].cnt = front.cnt + 1;
        que.push(a[front.sa[i]]);
      }
    }
  }
  int eqaul = 0, less = 0;
  for (int i = 0; i < pathlen - 1; i++) {
    int fg1 = 0, fg2 = 0;
    if (a[path[i + 1]].cnt == a[path[i]].cnt - 1) {
      for (int j = 0; j < b[path[i]].size(); j++) {
        if (a[b[path[i]][j]].cnt == a[path[i]].cnt - 1 &&
            b[path[i]][j] != path[i + 1]) {
          eqaul++;
          break;
        }
      }
    } else
      less++;
  }
  cout << less << " " << eqaul + less << endl;
  return 0;
}
