#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const long long modu = 1000000007;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << '\n'; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long n, m;
  cin >> n >> m;
  vector<vector<long long>> dg(n), rg(n);
  long long x, y;
  for (long long i = 0; i < m; i++) {
    cin >> x >> y;
    x--, y--;
    dg[x].push_back(y);
    rg[y].push_back(x);
  }
  long long k;
  cin >> k;
  vector<long long> p(k);
  for (long long i = 0; i < k; i++) {
    cin >> x;
    p[i] = x - 1;
  };
  vector<long long> dist(n, INT_MAX);
  long long d = p[k - 1];
  dist[d] = 0;
  queue<long long> q;
  q.push(d);
  while (!q.empty()) {
    long long source = q.front();
    q.pop();
    for (auto node : rg[source]) {
      if (dist[node] > dist[source] + 1) {
        dist[node] = dist[source] + 1;
        q.push(node);
      }
    }
  }
  long long _min = 0, _max = 0;
  for (long long i = 0; i < k - 1; i++) {
    long long source = p[i];
    long long dd = dist[source];
    long long nxt = p[i + 1];
    long long cnt = 0;
    bool ok = true;
    for (auto node : dg[source]) {
      if (dd - dist[node] == 1) cnt++;
      if ((node == nxt) && (dd - dist[node] != 1)) ok = false;
    }
    if (!ok)
      _min++, _max++;
    else if (cnt > 1)
      _max++;
  }
  cout << _min << " " << _max << '\n';
  return 0;
}
